]> err.no Git - varnish/commitdiff
We need to check the TTL here also, if a (sequence of) slow client(s)
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 20 Jul 2006 14:23:59 +0000 (14:23 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 20 Jul 2006 14:23:59 +0000 (14:23 +0000)
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

index 5f753077e3c45c000fce3dab7d6f9271dc2dd9ff..77f91ae36154675215e0e51368834ab7f74822d0 100644 (file)
@@ -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);