>>>>> "Peter" == Peter Bi <[EMAIL PROTECTED]> writes:

Peter> I have a question regarding to the cached files. Although the
Peter> maximal period is set to be 24 hours in httpd.conf's proxy
Peter> settings, many of the files, which were cached from the backend
Peter> mod_perl dynamical program, are strangely modified every a few
Peter> minutes. For all the files I checked so far, they do look to be
Peter> modified because the hex strings on top of the files (such as
Peter> 000000003D189FC2) are different after each modifications.

If you're talking about www.stonehenge.com, I don't provide
last-modified for any of the HTML pages: they're all dynamic.  If the
proxy server is caching them, it's going to still punch through to the
back for each hit.

Similarly, if you are talking about your own site, and you *do*
provide a mostly useless "last modified" time, then the front end is
still going to go to the back end and say "I've got a version from
time $x, is that current?" and if you're not handling
"if-modified-since", then every hit will be cached, uselessly.

I avoid that on stonehenge by not providing last-modified for any of
my HTML pages.  mod_proxy thus has no idea about caching, so it's all
dynamic.  My images automatically have last-modified, and thus the
cache can check for updates with if-modified-since, using the cache
when needed.  If I was really smart, I'd use mod_expires to say "this
image is good for $N hours", and then the front end wouldn't even
touch the back end at all.

As I said, as long as my loadav is low enough for my current hits, I've
got better things to work on. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to