Conditional GETs

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Jul 26 10:40:00 CEST 2007


In message <64E001C5-7D33-42F8-A41E-13EF0EED84F7 at digitalmarbles.com>, Ricardo N
ewbery writes:
>
>I assume Varnish supports ETags and conditional GETs "If-Modified- 
>Since" (IMS) and "If-None-Match" (INM)?

Right now we only support IMS, the ETags are mostly a crutch for
clock-less clients/servers, and varnish isn't relevant in those
cases.

>Are IMS/INM requests relayed to the backend before the content is  
>served out of cache?

No, we check IMS and if it passses, we serve out of cache if cache
is still valid.

>Do the Cache-Control headers moderating conditional requests ("must- 
>revalidate",  "proxy-revalidate", and "no-cache") modify this heuristic?

In general we don't respect cache-control from clients as we are not
a proxy in the RFC2616 sense, but rather part of the server.

Varnish' job is to protect the backend from unnecessary traffic
and since we are in cohort with the backend, we know our content
to be up to date and valid (anything else would be a configuration
error).

If you want to respect cache-control, you can implement it in
vcl_recv()

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list