Hi All,
I have an ide re: how squid should behave when must-revalidate is supplied
.... in short ... if squid has a cached copy of the page which includes a
last-modifed and a user requests that page from the cache. Squid should
revalidate the content of the page with the WWW Server, however it should
also include the If-Modified-Since header in order to give the WWW server
opertunity to respond with a 304 not modified and allow the proxy to return
the cached page to the user.
This what happens when client A requests the page :
ClientA ----> GET / ------> Proxy ------> GET / -----------> WWW
Server
WWW Server ----> 401, Authentication Required ----> Proxy --------> Client
ClientA ----> GET / + Authentication ------> Proxy ------> GET / +
Authentication -----------> WWW Server
WWW Server ----> 200 OK, Cache-control: public, proxy-revalidate + Last
Modified = XXX ----> Proxy (Proxy Caches Page) --------> Client
Client -----> GET / + If-Modified-Since XXXX ----> Proxy -----> GET / +
If-Modified-Since XXXX ---------> WWW Server
WWW Server -------> 304 Not modified ---------> Proxy --------> 304 Not
Modified -------------> Client
---------------------------------------------
ClientB (WHO IS REQUESTING THE SAME CONTENT ) then follows the same pattern
but does not know the last modified date, and does not send it. In my
opionon (for what its worth) the proxy should insert the If-Modified-Since
into the header before sending the request to the WWW server, as this would
give the WWW Server opertunity to respond with a 304, and allow squid to
send out the cached version.
What should happen to client B
ClientA ----> GET / ------> Proxy ------> GET / -----------> WWW
Server
WWW Server ----> 401, Authentication Required ----> Proxy --------> Client
ClientA ----> GET / + Authentication ------> Proxy ------> GET / +
Authentication (>>If-Modified-Since<<) -----------> WWW Server
WWW Server -------> 304 Not modified ---------> Proxy --------> 200 OK,
Cache-control: public, proxy-revalidate + Last Modified =
XX -------------> Client
What currently happens is that the WWW server has to generate the content
every time.
Im open to everyones opinion :) ... and ridicule I guess :)
Thanks
Warrick FitzGerald
Senior Systems Engineer
LiveTechnology Inc.
Received on Tue May 21 2002 - 21:11:56 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:08:11 MST