How to prevent varnish from deleting its entire cache when full?

Fredrik Kristiansen fredrik at nettby.no
Tue Jan 15 23:46:51 CET 2008


Hi,

I'm trying to prevent varnish from deleting its entire cache when full. So I
have added this our VCL confguration:

sub vcl_discard {
    # Keep objects in use last 5 minutes
    if (obj.lastuse > 300) {
        discard;
    }

    keep;
}

But variable obj.lastuse don't seem to be available and varnish won't start
with this script.

Fredrik Kristiansen
Nettby.no
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20080115/4096dc02/attachment-0001.html>


More information about the varnish-misc mailing list