varnish5 - how to view what currently is in cache?

Admin Beckspaced admin at beckspaced.com
Mon Oct 31 10:23:50 CET 2016


Am 31.10.2016 um 07:42 schrieb Andreas Plesner:
> On Sat, Oct 29, 2016 at 11:06:44AM +0200, Admin Beckspaced wrote:
>> but how would i proceed if i want to know what actually is in the cache?
>>
>> e.g. view a cached version of an URL: http://mydomain.com/somepage
> Fetch it with a HTTP client.
>
thanks andreas,

yes, i know i can fetch it with a http client to see the cached version ;)

but i'm looking more into finding out what URL's there are in the cache 
to find the culprits as i never know what clients out there request.

in the past i was working with other caching systems, like PEAR Cache 
Lite, which is based on PHP.
and there I can easily see what URLs are in the cache. this way i could 
easily see the 'wrong' cached URLs and re-adjust my caching system to 
get a high positive hit rate.

for example, i got URL like:

http://mydomain.com/?param=foo&doe=john

but anyone out there is allowed to request stuff like:

http://mydomain.com/?param=foo&doe=john&culprit=this&anotherculprit=that

the additional params the client sends actually do nothing but as far as 
I understood, varnish will cache based on URLs ... so ending up with 2 
cached versions ...

so ... to spot those culprits i would like to know if there is a list of 
URLs / cached objects in varnish that i can view ... investigate

to then adjust the vlc to filter out those bad cached to get a higher 
positive hit rate.

does this make sense? is something like that available in varnish 5?

thanks & greetings
becki



More information about the varnish-misc mailing list