pages are missing in cache

Per Buer perbu at varnish-software.com
Sun Jun 29 11:10:46 CEST 2014


Hi Tim,

On Sun, Jun 29, 2014 at 2:51 AM, Tim Dunphy <bluethundr at gmail.com> wrote:

> Hey guys,
>
>
>  I've setup varnish cache on my site. And I'm using this command to
> determine which pages are not being cached:
>
> varnishtop -b -i TxURL
>
>  It seems that the following list (and then some) are all cache misses if
> what I'm reading is to be believed:
>
> list length 150
>
>      6.97 TxURL          /cometchat/cometchat_receive.php
>      3.57 TxURL          /
>

(..)

The details of the VCL is not really important, because we can't really see
what is going on your website. The traffic pattern is the important thing.

I see you are setting some TTLs based on the URL. The better solution would
be to clean up the backend and have it set proper cache-control headers.

Your goal should be to set the TTL for as long av possible and have the
application do a PURGE call out to Varnish whenever it changes. Increasing
the TTL is more or less the only way of increasing the hit rate so you
either have to suffer with slower updates and get cache invalidation going.
Read the cache invalidation chapter in the docs. There are probably PHP
examples that would fit your framework out there.

If your backend application supports it and you are on Varnish 4.0 you
could try playing around IMS requests. That way Varnish can revalidate
objects and extent the TTL.

If you haven't you might spend some reading the user guide. Hopefully that
will explain the basics and give you and understanding of how you can
improve your own Varnish installation.

-- 
 <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/20140629/9e2458a9/attachment-0001.html>


More information about the varnish-misc mailing list