Am Fr, den 17.12.2004 schrieb Henrik Nordstrom um 19:02:
> > Is there a way to disable this with a configuration directive?
>
> No, only by modifying the source. See refresh.c
Thanks for the hint! Does this make sense? Do I get this right?
Regards
Thomas
diff -Nur squid-2.5.STABLE7.orig/src/cf.data.pre squid-2.5.STABLE7/src/cf.data.pre
--- squid-2.5.STABLE7.orig/src/cf.data.pre 2004-10-08 19:41:10.000000000 +0200
+++ squid-2.5.STABLE7/src/cf.data.pre 2004-12-17 21:47:42.132485508 +0100
@@ -4017,4 +4017,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 -Nur squid-2.5.STABLE7.orig/src/refresh.c squid-2.5.STABLE7/src/refresh.c
--- squid-2.5.STABLE7.orig/src/refresh.c 2002-07-18 11:22:17.000000000 +0200
+++ squid-2.5.STABLE7/src/refresh.c 2004-12-17 22:08:46.887912258 +0100
@@ -331,7 +331,12 @@
* 60 seconds delta, to avoid objects which expire almost
* immediately, and which can't be refreshed.
*/
- int reason = refreshCheck(entry, NULL, 60);
+ int reason;
+ if (Config.minimum_expiry_time) {
+ reason = refreshCheck(entry, NULL, Config.minimum_expiry_time);
+ } else {
+ reason = refreshCheck(entry, NULL, 60);
+ }
refreshCounts[rcStore].total++;
refreshCounts[rcStore].status[reason]++;
if (reason < 200)
diff -Nur squid-2.5.STABLE7.orig/src/structs.h squid-2.5.STABLE7/src/structs.h
--- squid-2.5.STABLE7.orig/src/structs.h 2004-10-06 00:56:36.000000000 +0200
+++ squid-2.5.STABLE7/src/structs.h 2004-12-17 21:21:28.414182041 +0100
@@ -706,6 +706,7 @@
} warnings;
char *store_dir_select_algorithm;
int sleep_after_fork; /* microseconds */
+ time_t minimum_expiry_time; /* seconds */
external_acl *externalAclHelperList;
};