Hi This is just a simple patch to allow disabling of get_styles() caching. - Just been trying to make axkit work nicely in a development environment where people don't access to restart apache, and can only configure stuff via .htaccess files.
if get_styles caching is enabled, you might not get served the content you'd expect if you start playing with styles in htaccess files. ie if you change the stylesheets served for your default style. This fixes it. Mike. Index: lib/AxKit.pm =================================================================== RCS file: /home/cvspublic/xml-axkit/lib/AxKit.pm,v retrieving revision 1.38 diff -u -r1.38 AxKit.pm --- lib/AxKit.pm 29 Jan 2003 13:44:57 -0000 1.38 +++ lib/AxKit.pm 23 Apr 2003 16:31:29 -0000 @@ -392,7 +392,7 @@ my $recreate = 0; # regenerate from source (not cached) - my $styles = get_styles($media, $preferred, $cache, $provider); + my $styles = get_styles($media, $preferred, $cache, $provider, $r); { local $^W; @@ -811,7 +811,7 @@ } sub get_styles { - my ($media, $style, $cache, $provider) = @_; + my ($media, $style, $cache, $provider, $r) = @_; my $key = $cache->key(); @@ -820,7 +820,8 @@ my $styles; - if (exists($AxKit::Stash{$key}) + if (!$r->dir_config('AxDisableGetStylesCache') + && exists($AxKit::Stash{$key}) && !$provider->has_changed($AxKit::Stash{$key}{mtime})) { AxKit::Debug(3, "styles cached");