Purge and cache content mist.
Harald Friessnegger
harald at webmeisterei.com
Mon Mar 23 14:14:23 CET 2009
hi sebastien
Am Montag, 23. März 2009 12:32:22 schrieb Sébastien FOUTREL:
> Hello,
>
> I read a lot of things in the list and varnish sites but some things stay
> fuzzy to me.
>
> Is there a way to find if something is in the cache, have a map of cached
> content or some script that give one ?
i don't know of a list output. what i do is to use varnishlog or turn on debug
headers:
open varnishlog, request a resource and see at the X-Varnish-Action Header
requesting a resource the first time that gets cached will give you
TxHeader c X-Varnish-Action: FETCH (insert)
requesting it again will log
TxHeader c X-Varnish-Action: HIT (deliver - from cache)
personally i'm using some combination with grep that gives me the headers i'm
interested in:
For debugging all requests to a certain url (eg /test/test/image_mini) and see
important headers::
varnishlog -c -o RxURL '^/test/test/image_mini$' | grep -E "RxRequest|RxURL|
Host:|TxStatus|TxResponse|X-Varnish-Action"
>
> Is it possible to do recursive purge in a way or another ?
>
> I'd like to purge "www.example.org/that-part/" is to possible to simply
> purge all objects under that url ?
run varnish with the -T option (eg "-T localhost:6182")
connet via telnet:
telnet localhost 6182
and call something like
url.purge /that-part/.*
to see whether to use www.example.org/that-part or just /that-part or any
other fancy url (you might have a webserver rewrite urls for doing
virtualhosting) you can use varnishlog again:
varnishlog -c -i RxURL
hope that helps
fRiSi
>
> Thank you.
>
> --
> Sébastien FOUTREL
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
--
Webmeisterei GmbH - Büro für Netzfragen
Tel: +43 5572 908877, Fax: +43 5572 908877-66
Steinebach 18, A-6850 Dornbirn
http://www.webmeisterei.com
More information about the varnish-misc
mailing list