You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by Matt Sergeant <ma...@sergeant.org> on 2003/05/08 00:58:20 UTC

Re: Issues with Providers (fwd)

---------- Forwarded message ----------
Date: Wed, 07 May 2003 11:40:43 -0400
From: David Nolan <vi...@cmu.edu>
To: Matt Sergeant <ma...@sergeant.org>
Subject: Re: Issues with Providers (fwd)



--On Wednesday, May 07, 2003 3:37 PM +0100 Matt Sergeant
<ma...@sergeant.org> wrote:

> I think these things sit on the border of being bugs and not being bugs...
> Tricky really. There's something in LibXSLT.pm that you can set (via
> PerlSetVar - grep for dir_config) that turns off stylesheet caching that
> probably achieves what you need.

I agree that the multiple calls to get_strref is on the border.  I guess
the issues is that either AxKit needs to understand that providers get_*
methods may have side effects, and thus should not be called multiple
times, or developers need to be aware that only 'init' is guaranteed to be
called only once.  Either way is acceptable to me.

As to the AxDisableXSLTStylesheetCache setting... Thats useful to know
about (there doesn't seem to be any documentation for A:A:L:LibXSLT... but
I'm sure you know that).  But my brief testing indicates that it disables
caching of compiled stylesheets (which I want, and isn't causing me a
problem), but does *not* disable the caching of the results of get_styles,
which is the problem I'm seeing.  I just changed my provider to have
get_styles return a reference to a non existant stylesheet, and AxKit keeps
happily using the old stylesheet unless I restart the web server.
(Presumably a freshly spawned apache process would pick up the new
stylesheet.  I assume the caching is in the memory of a particular apache
child process...)

Hmm... While testing this I just discovered that causing the mtime method
of my provider to return a newer timestamp causes AxKit to call the
get_styles method.  So I guess the problem is that style (instruction)
caching (as opposed to compiled stylesheet caching) is not turned off by
AxNoCache.  Which makes the bug easy to find.  I'm attaching a patch that
fixes the problem for me.

-David Nolan
 Network Software Developer
 Computing Services
 Carnegie Mellon University