On onsdag 15 juni 2005, 05:50, Scott Penrose wrote:
> For some reason, even if checking for the cached version, the sub
> get_strref is called. This means it is called twice on a normal
> request and once on a cached request. One particular module is fairly
> slow at converts and I need it to work properly on the caching
> side.
Yup, this bit me too.... Well, I think the thing is that AxKit runs the
Provider once to get the stylesheet information, for the upcoming
transformation, and then run it again to create the content. It's a
little quirk, and I think it is fixed in current CVS if you're
interested.
What I've done is that if I create a DOM, in get_dom, I store the dom in
$self->{dom), and just check it on second pass, or similarly in
get_strref, assign the output string to $self->{out} or something like
that. In the start of the get_strref, I then check if it exists, and if
it does, I return it just like that... :-)
Hope that helps.
Cheers,
Kjetil
--
Kjetil Kjernsmo
Programmer/Astrophysicist/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/ OpenPGP KeyID: 6A6A0BBC
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]