r527 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Thu Jul 20 16:24:00 CEST 2006
Author: phk
Date: 2006-07-20 16:23:59 +0200 (Thu, 20 Jul 2006)
New Revision: 527
Modified:
trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
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.
Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-07-20 13:42:56 UTC (rev 526)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-07-20 14:23:59 UTC (rev 527)
@@ -101,12 +101,13 @@
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);
More information about the varnish-commit
mailing list