Markus Wolf wrote:
> Hallo,
> 
> I'm writing my first Apache 2 - Filter yesterday - it works fine,
> but i have one problem with caching.
> 
> This is my conf-entry
> <Files ~ "\.html">
> PerlOutputFilterHandler ApacheMY::session
> 
> </Files>
> 
> my problem is, that the filter only work, when I save or "touch"
> the html-file again - the filter seems to cache the output with the
> help of the "last change date" of the file.

This is probably because your browser is sending If-Modified-Since
http GET requests and not re-requesting the file since it doesn't appear
to have changed. (see 
http://perl.apache.org/docs/general/correct_headers/correct_headers.html#Conditional_GET)

You can verify this is the case by using a simpler http client, like
LWP, wget, curl, etc and you should see your filter being run every
single time.

> What have I to do, that the filter is process every time, a
> site is called?

If you want to make sure the browsers _never_ cache your content (make really
sure that's what you want) and use $r->no_cache(1)

http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_no_cache_

But really, it's fairly possible that in your case, this is an annoyance for
development, but actually a fairly _good_ feature in general.

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to