Am So, den 19.12.2004 schrieb Henrik Nordstrom um 1:22:
> If you port it to Squid-3 then there is no problem.
>
> Squid-2.5 is feature frozen since long time back and only bugfixes
> accepted.
Ok, attached is a patch against squid-3.0-PRE3-20041219. Thanks for your
help!
Regards
Thomas
diff -ur squid-3.0-PRE3-20041219.orig/src/cf.data.pre squid-3.0-PRE3-20041219/src/cf.data.pre
--- squid-3.0-PRE3-20041219.orig/src/cf.data.pre 2004-12-10 01:49:54.000000000 +0100
+++ squid-3.0-PRE3-20041219/src/cf.data.pre 2004-12-19 11:54:26.972649361 +0100
@@ -4514,4 +4514,18 @@
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.
+DOC_END
+
EOF
diff -ur squid-3.0-PRE3-20041219.orig/src/refresh.cc squid-3.0-PRE3-20041219/src/refresh.cc
--- squid-3.0-PRE3-20041219.orig/src/refresh.cc 2004-11-06 23:20:47.000000000 +0100
+++ squid-3.0-PRE3-20041219/src/refresh.cc 2004-12-19 10:20:50.806349784 +0100
@@ -390,14 +390,15 @@
/*
* 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, ESI ? 0 : Config.minimum_expiry_time);
refreshCounts[rcStore].total++;
refreshCounts[rcStore].status[reason]++;
diff -ur squid-3.0-PRE3-20041219.orig/src/structs.h squid-3.0-PRE3-20041219/src/structs.h
--- squid-3.0-PRE3-20041219.orig/src/structs.h 2004-12-08 01:24:42.000000000 +0100
+++ squid-3.0-PRE3-20041219/src/structs.h 2004-12-19 10:11:59.970181186 +0100
@@ -714,6 +714,7 @@
warnings;
char *store_dir_select_algorithm;
int sleep_after_fork; /* microseconds */
+ time_t minimum_expiry_time; /* seconds */
external_acl *externalAclHelperList;
#if USE_SSL