Mailing List Archive

How to prevent varnish from deleting its entire cache when full?
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: http://projects.linpro.no/pipermail/varnish-misc/attachments/20080115/4096dc02/attachment.htm
How to prevent varnish from deleting its entire cache when full? [ In reply to ]
In message <e9379eda0801151446y6386f313h317d01321369effc at mail.gmail.com>, "Fred
rik Kristiansen" writes:

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

I'm currently working on the prefetch/degraded mode code, and that will
change most if not all of this.

Stay tuned.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.