On Wed, 20 Mar 2002, Markus.Spring wrote:

> Hello list,
>
> How can I invalidate the cached results for one specific xml-file/and/or
> Request?
>
> Thought about adding ';cache_invalidate=1' to the url to force the cache
> refresh, but looking through the code and browsing the mailinglist I
> didn't find an entry point how to realize
> such a function.
>
> Any help will be appreciated

I was thinking about this too. We don't really have a remote way to do it.
I suspect a neat plugin would do it. Something like:

package Apache::AxKit::Plugin::ResetCache;

use Apache::Constant qw(OK);
use Apache::Request;
use Apache::AxKit::Cache;

sub handler {
  my $r = Apache::Request->instance(shift);
  return OK unless $r->param('reset_cache');
  # WARNING: This only resets the cache for the default style
  # and the 'screen' (web browser) media type. Will need a mechanism
  # to do it for other types.
  my $cache = Apache::AxKit::Cache->new($r, $r->filename() . '.gzip' .
       $ENV{PATH_INFO}, '', 'screen', $r->notes('axkit_cache_extra'));
  $cache->reset;
  return OK;
}

1;

-- 
<!-- Matt -->
<:->Get a smart net</:->



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to