Caching doubt

Bedis 9 bedis9 at gmail.com
Tue Sep 7 06:34:22 CEST 2010


Hi,

What kind of Vary header your webserver sends?
If no, there is no reason to cache 3 versions of this object unless
your conditionnal request does not match any header of the cached
object.

cheers

On Mon, Sep 6, 2010 at 4:40 PM, Jonathan Leibiusky <ionathan at gmail.com> wrote:
> Hi!
> I'm playing with If-None-Match and Cache-Control: max-age   headers and I
> have a doubt. Maybe it is more related to HTTP than Varnish, but it worth
> asking.
>
> Imagine that I have 3 user-agents, a varnish and my webserver.
> When the clients ask the first time for /example, varnish doesn't have
> anything cached so he ask the webserver for it. The webserver response has
> Cache-Control: max-age=180 and ETag: 123 (for example).
> So Varnish will cache the response for 180 seconds as well as the
> user-agents.
> After 180 seconds, the 3 user-agents will request /example for a conditional
> If-None-Match header because they got the ETag. Since it is a conditional
> request varnish will ask the webserver and will get a fresh response with
> all the caching headers. When the other 2 user-agent make the same
> conditional request they will generate another request to the webserver
> unless varnish has some mechanism to answer himself.
> Is that right? Does varnish has this mechanism?
>
> Thanks!
>
> Jonathan
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>




More information about the varnish-misc mailing list