]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
skip adding objects that will probably be replaced before the next
authorwessels <>
Wed, 8 Sep 1999 04:15:11 +0000 (04:15 +0000)
committerwessels <>
Wed, 8 Sep 1999 04:15:11 +0000 (04:15 +0000)
digest update.

src/store_digest.cc

index c5e371dbc0d2692f7f83880edb112f6798a3ff86..b65fc9d14fce691697608f046a19f72c64ea4245 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: store_digest.cc,v 1.34 1998/12/05 00:54:44 wessels Exp $
+ * $Id: store_digest.cc,v 1.35 1999/09/07 22:15:11 wessels Exp $
  *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
@@ -222,9 +222,19 @@ storeDigestAddable(const StoreEntry * e)
            StoreDigestRebuildPeriod);
        return 0;
     }
-    /* idea: how about also skipping very fresh (thus, potentially unstable) 
-     * entries? Should be configurable through cd_refresh_pattern, of course */
-
+    /*
+     * idea: how about also skipping very fresh (thus, potentially
+     * unstable) entries? Should be configurable through
+     * cd_refresh_pattern, of course.
+     */
+    /*
+     * idea: skip objects that are going to be purged before the next
+     * update.
+     */
+#if !HEAP_REPLACEMENT
+    if ((squid_curtime + StoreDigestRebuildPeriod) - e->lastref > storeExpiredReferenceAge())
+       return 0;
+#endif
     return 1;
 }