]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
minumum_expiry_time directive
authorhno <>
Fri, 24 Dec 2004 05:17:20 +0000 (05:17 +0000)
committerhno <>
Fri, 24 Dec 2004 05:17:20 +0000 (05:17 +0000)
        The minimum caching time according to (Expires - Date)
        Headers Squid honors if the object can't be revalidated
        defaults to 60 seconds. In reverse proxy enorinments it
        might be desirable to honor shorter object lifetimes. It
        is most likely better to make your server return a
        meaningful Last-Modified header however.

by Thomas Ristic <thr@bootet.net>

CONTRIBUTORS
src/cf.data.pre
src/refresh.cc
src/structs.h

index d16511eed7ee738d26452d97cf564fc93e865aea..6a2c375f4b0e942cff5a880df61f628d5906d5bb 100644 (file)
@@ -92,5 +92,6 @@ and ideas to make this software available.
        Bruce Murphy <pack-squid@rattus.net>
        Francis Daly <francis@daoine.org>
        Joachim Bauch <jojo@fistofbenztown.de>
+       Thomas Ristic <thr@bootet.net>
 
        Duane Wessels <wessels@squid-cache.org>
index fa74f456a5308c23cf19b6820549688534571e4d..3d9e35b8e7736a3edca43a309a266e2cf5145c0d 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.368 2004/12/22 16:21:33 serassio Exp $
+# $Id: cf.data.pre,v 1.369 2004/12/23 22:17:20 hno Exp $
 #
 #
 # SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -4549,4 +4549,18 @@ DOC_START
        until all the child processes have been started.
 DOC_END
 
+NAME: minimum_expiry_time
+COMMENT: (seconds)
+TYPE: time_t
+LOC: Config.minimum_expiry_time
+DEFAULT: 60 seconds
+DOC_START
+        The minimum caching time according to (Expires - Date)
+        Headers Squid honors if the object can't be revalidated
+        defaults to 60 seconds. In reverse proxy enorinments it
+        might be desirable to honor shorter object lifetimes. It
+        is most likely better to make your server return a
+        meaningful Last-Modified header however.
+DOC_END
+
 EOF
index 350056f0c9577506a3d92774cc6e3cf1c0d3b73f..a2085fbed6d401065973077c171adeaa05b453c5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: refresh.cc,v 1.67 2004/12/22 16:21:33 serassio Exp $
+ * $Id: refresh.cc,v 1.68 2004/12/23 22:17:22 hno Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -397,14 +397,11 @@ refreshIsCachable(const StoreEntry * entry)
     /*
      * Don't look at the request to avoid no-cache and other nuisances.
      * the object should have a mem_obj so the URL will be found there.
-     * 60 seconds delta, to avoid objects which expire almost
-     * immediately, and which can't be refreshed.
+     * minimum_expiry_time seconds delta (defaults to 60 seconds), to 
+     * avoid objects which expire almost immediately, and which can't 
+     * be refreshed.
      */
-    /* For ESI, we use a delta of 0, as ESI objects typically can be
-     * refreshed, but the expiry may be low to enforce regular
-     * checks
-     */
-    int reason = refreshCheck(entry, NULL, ESI ? 0 : 60);
+    int reason = refreshCheck(entry, NULL, Config.minimum_expiry_time);
     refreshCounts[rcStore].total++;
     refreshCounts[rcStore].status[reason]++;
 
index 284da806361398f68accfb0068820501b66b3e3b..765bd464cb4b83bcc461f4f8d4b6d00dc481f4b5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.502 2004/12/22 16:21:33 serassio Exp $
+ * $Id: structs.h,v 1.503 2004/12/23 22:17:22 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -716,6 +716,7 @@ struct _SquidConfig
     warnings;
     char *store_dir_select_algorithm;
     int sleep_after_fork;      /* microseconds */
+    time_t minimum_expiry_time;        /* seconds */
     external_acl *externalAclHelperList;
 #if USE_SSL