RE: [users@httpd] Image caching / Expiry times / 304s

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I see you are using Apache 2.0.46. I seem to remember that there once was a bug in mod_cache causing stale entries not to be replaced in certain versions of Apache 2.0. Apache 2.0.46 may be one of the versions affected by this problem. That would cause the cache provider to decline to serve the response for every single request after the cached response has expired, which would be consistent with the fact that responses (including 304) are consistently served by the back end after the cached response has expired.

You should be able to verify this behaviour by 
- set LogLevel debug,
- flushing the cache (by removing everything under the cache root, and possibly restarting Apache if your are using memory caching),
- request a short lived cacheable element, 
- verify that subsequent responses are server by cache, 
- wait till the cache response expires,
- request the same short-lived cacheable element,
- observe the debug trace in the error log
- request the same short-lived cacheable element (is it served from cache or does the provider still say it is stale ??)

I know for sure that this particular problem does not exist in Apache 2.0.54. I suspect it was corrected prior to the release of 2.0.49.

-ascs

-----Original Message-----
From: Matthew Claridge [mailto:mclaridge@xxxxxxxxxxxxx] 
Sent: Wednesday, June 07, 2006 10:17 AM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] Image caching / Expiry times / 304s
Ok, there are two things going on here, one of which I'll hang my head 
in shame for :-(

Firstly, the correct Cache-Control header is sent for the initial 200 
response on these files - so what would prevent it from being sent only 
on 304 responses?

Secondly, the /Cache-Control max-age=0/ header I mentioned earlier is in 
the REQUEST header, not the server's response header! Seems I can't read 
properly!

To clarify, these are the request and response headers for an initial 
request for an image and then a subsequent request where the image is 
cached:

Host=www.highandwild.co.uk
User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) 
Gecko/20060508 Firefox/1.5.0.4
Accept=image/png,*/*;q=0.5
Accept-Language=en,en-us;q=0.5
Accept-Encoding=gzip,deflate
Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive=300
Connection=keep-alive
Referer=http://www.highandwild.co.uk/
Cookie=KMVisitor=10606061024500283146
Pragma=no-cache
Cache-Control=no-cache

Status=OK - 200
Date=Wed, 07 Jun 2006 08:10:57 GMT
Server=Apache/2.0.46 (Red Hat)
Last-Modified=Wed, 07 Jun 2006 08:05:00 GMT
Etag="85c0a2-f79-d2f28300"
Accept-Ranges=bytes
Content-Length=3961
Cache-Control=max-age=432000
Expires=Mon, 12 Jun 2006 08:10:57 GMT
Connection=close
Content-Type=image/jpeg


Host=www.highandwild.co.uk
User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) 
Gecko/20060508 Firefox/1.5.0.4
Accept=image/png,*/*;q=0.5
Accept-Language=en,en-us;q=0.5
Accept-Encoding=gzip,deflate
Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive=300
Connection=keep-alive
Referer=http://www.highandwild.co.uk/
Cookie=KMVisitor=10606061024500283146
If-Modified-Since=Wed, 07 Jun 2006 08:05:00 GMT
If-None-Match="85c0a2-f79-d2f28300"
Cache-Control=max-age=0

Status=Not Modified - 304
Date=Wed, 07 Jun 2006 08:16:21 GMT
Server=Apache/2.0.46 (Red Hat)
Connection=close
Etag="85c0a2-f79-d2f28300"


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux