Why my varnish create different cache object for different client?

Per Buer perbu at varnish-software.com
Thu May 15 16:36:48 CEST 2014


Hi Mr Fish.

On Wed, May 14, 2014 at 6:40 PM, Thirteen Fish <fishthirteen at gmail.com>wrote:

> Every one, I'm a newbie for varnish and I need your help.
>
> My varnish has an strange problem. It create different hash for same url
> for different client, and this result in any new user which access my site
> can't hit the cache.
>
> From the varnish log, I found the varnish hit different object though the
> hash data is same. Following are the logs.
>

Thanks. The reason Varnish is doing this is because the backend asks it to
do so. Check out this line:

Vary: Accept-Encoding, Accept-Encoding, Cookie, Accept-Language

If you google "http vary" you'll find some nice explanations on how it
works. With that Vary line you'll never get a high hit rate.

-- 
 <http://www.varnish-software.com/> *Per Buer*
CTO | Varnish Software
Phone: +47 958 39 117 | Skype: per.buer
We Make Websites Fly!

Winner of the Red Herring Top 100 Global Award 2013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140515/c7e4fb0e/attachment-0001.html>


More information about the varnish-misc mailing list