Conditional GETs

Ricardo Newbery ric at digitalmarbles.com
Fri Jul 27 11:11:17 CEST 2007


On Jul 26, 2007, at 9:55 PM, Poul-Henning Kamp wrote:

> Ricardo Newbery writes:
>> How about an "INM without IMS" request?  Still served out of cache I
>> suppose.  Is it possible to modify this behavior via vcl?
>
> Everything is served out of cache except Cookies and Authentication.
>
> IMS is only special in that it does not return the body unless  
> necessary.
>
> INM is ignored and hence the body is always returned.


Yes, but is it possible to get INM behavior via a custom VCL?  In  
other words, Varnish already has a mechanism to serve 304s -- is it  
possible, using VCL, to tie into this mechanism?  And is it possible,  
using VCL, to test for the ETag value in the cached copy?




>> Okay.  If I understand correctly, since Varnish doesn't respect  
>> cache-
>> control from clients, then backend-generated cache-control like  
>> "must-
>> revalidate",  "proxy-revalidate", and "no-cache" are unnecessary
>> since the "max-age" and "s-maxage" response cache-controls are
>> sufficient -- at least as far as the Varnish heuristic is concerned.
>> Correct?
>
> You may still want to generate the headers for the clients to see.


Yes, I understand this.  What I need to do for the clients is a  
separate issue.

I'm a little unsure as I didn't hear an affirmation to my question...  
so does Varnish respect max-age and s-maxage in the response?



>> Does Varnish respect "private" and "no-store" in the response?
>
> No.  Varnish is considered part of the web-server, and thus these
> don't apply to it (unless people implement them in VCL)



Okay...  How should the backend inform Varnish that a certain item  
should not be stored in the cache?

Ric






More information about the varnish-misc mailing list