varnish storage tuning

Mike Perham mperham at onespot.com
Fri Jun 12 00:59:53 CEST 2009


Does restart cause the backend to be queried for the page again?  I'd prefer
if a purge did not re-fetch the URL from the backend as this can caused
unwanted content to stay in the cache and my cache is relatively limited in
size.  Can I do something like:
sub vcl_hit {
    if (req.request == "PURGE") {
        set obj.ttl = 0;
        error 200 "Purged";
    }
}

sub vcl_miss {
    if (req.request == "PURGE") {
        error 200 "Purged (not in cache)";
    }
}


On Thu, Jun 11, 2009 at 4:46 PM, Darryl Dixon - Winterhouse Consulting <
darryl.dixon at winterhouseconsulting.com> wrote:

>
> Instead, in vcl_hit, if the object should be purged, set obj.ttl to 0 and
> then restart the request. This solved the problem for me.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20090611/c6c2c9e5/attachment-0001.html>


More information about the varnish-misc mailing list