Search squid archive

Re: squid reverse proxy caching session id?

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

 



Oliver Schoett wrote:
   Cache-Control: private
   Expires: Mon, 01 Jan 2007 00:00:00 GMT

Sorry, but this is still not optimal. The Expires: date in the past will also defeat caching by HTTP 1.1 caches. RFC 2616 allows for HTTP 1.1 directives to override the Expires: date of HTTP 1.0 as follows:

   Cache-Control: private, max-age=86400
   Expires: Mon, 01 Jan 2007 00:00:00 GMT
The max-age directive is a lifetime in seconds and, if present, is used by HTTP 1.1 caches instead of the Expires: date (RFC 2616, Sect. 13.2.4: The max-age directive takes priority over Expires [...]).

In the example above, a HTTP 1.1 cache may cache the resource for 24 hours (86400 seconds), while a HTTP 1.0 cache sees only the Expires: date in the past and hence must not cache (RFC 1945, Sect. 10.7: If the [Expires:] date given is equal to or earlier than the value of the Date header, the recipient must not cache the enclosed entity).

This complication occurs only if we want diffent caching policies for HTTP 1.0 and 1.1; the easy cases of either no caching or caching for the same time by both types of caches can both be handled by just sending the Expires: date (no Cache-Control: needed).

Regards,

Oliver Schoett


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux