From ac17ccacee72f5bc305964fc005db767043f1daf Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 20 Jul 2006 14:23:59 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/cache_hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5