Hi,
On Thu, Jun 5, 2008 at 2:15 AM, Henrik Nordstrom <[EMAIL PROTECTED]> wrote: > tor 2008-06-05 klockan 00:19 +0800 skrev howard chen: >> 1. Is it true Squid will only use the Last Modified and Cache Control >> header for caching, > > Yes. > >> other headers are not important in my setup? > > Well.. don't send conflicting Expires or "Pragma: no-cache" headers.. > >> 2. I found that Squid will not consult the backend for updating the >> Last Modified value and sometimes send out 304 directly. So is that if >> my file has changed in my backend, I need to PURGE the Squid? > > Or wait until the freshness expires. Or issue an request with > Cache-Control: max-age=0 to force the freshness to expire "now". When > the object freshness has expired Squid will use Last-Modified to query > the backend to see if there has been any changes. Thanks first. The following is my understanding (correct me if I am wrong) 1. When Apache send Expire =... thru Squid, if it is future time, then client won't issue any request to the server side again for the same resource (unless you press F5 to issue max-age=0), so mod_expire has nothing to do with squid, it is client level stuffs. 2. Squid caching basically depends on Last Modified header (maybe also Etag, but I have disabled all) Now my problems are: 1. If I only send Last Modified, but no Expire, how do Squid know the freshness time if it don't contact the backend? Or should I always send Expire with Last Modified or maybe use refresh plattern / PURGE / set max-age=0 ? Thanks. Howard