From: phk Date: Thu, 20 Jul 2006 14:23:59 +0000 (+0000) Subject: We need to check the TTL here also, if a (sequence of) slow client(s) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac17ccacee72f5bc305964fc005db767043f1daf;p=varnish We need to check the TTL here also, if a (sequence of) slow client(s) manages to hold the document referenced, the prefetcher may never get lucky with it and it will linger here much past last sell date. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@527 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_hash.c b/varnish-cache/bin/varnishd/cache_hash.c index 5f753077..77f91ae3 100644 --- a/varnish-cache/bin/varnishd/cache_hash.c +++ b/varnish-cache/bin/varnishd/cache_hash.c @@ -101,12 +101,13 @@ HSH_Lookup(struct sess *sp) return (NULL); } were_back: - /* XXX: check ttl */ /* XXX: check Vary: */ if (!o->cacheable) { /* ignore */ } else if (o->ttl == 0) { /* Object banned but not reaped yet */ + } else if (o->ttl < sp->t_req) { + /* Object expired */ } else if (BAN_CheckObject(o, h->url)) { o->ttl = 0; VSL(SLT_ExpBan, 0, "%u was banned", o->xid);