=== modified file 'src/cf.data.pre' --- src/cf.data.pre 2010-05-14 05:37:19 +0000 +++ src/cf.data.pre 2010-05-19 18:29:28 +0000 @@ -6941,4 +6941,15 @@ Whether to lookup the EUI or MAC address of a connected client. DOC_END +NAME: access_sibling_when_stale +COMMENT: on|off +TYPE: onoff +DEFAULT: off +LOC: Config.onoff.access_sibling_for_stale_resource +DOC_START + When Squid has a stale cached response available, it will not query siblings, + by default. When this setting is on Squid will do so, as long as the cache_peer + line for the sibling does not have the 'allow-miss' option configured. +DOC_END + EOF === modified file 'src/neighbors.cc' --- src/neighbors.cc 2010-05-02 19:32:42 +0000 +++ src/neighbors.cc 2010-05-19 18:29:28 +0000 @@ -156,13 +156,19 @@ if (request->flags.nocache) return 0; - if (request->flags.refresh) + /*Ignore refresh flag if access_sibling_for_stale_resource flag is on unless allow_miss is enabled for this peer + (needed to avoid forwarding loops).*/ + if (request->flags.refresh && !Config.onoff.access_sibling_for_stale_resource || + request->flags.refresh && p->options.allow_miss) return 0; if (request->flags.loopdetect) return 0; - if (request->flags.need_validation) + /*Ignore need_validation flag if access_sibling_for_stale_resource flag is on unless allow_miss is enabled for this peer + (needed to avoid forwarding loops).*/ + if (request->flags.need_validation && !Config.onoff.access_sibling_for_stale_resource || + request->flags.need_validation && p->options.allow_miss) return 0; } === modified file 'src/structs.h' --- src/structs.h 2010-04-17 02:29:04 +0000 +++ src/structs.h 2010-05-19 18:29:28 +0000 @@ -437,6 +437,7 @@ int WIN32_IpAddrChangeMonitor; int memory_cache_first; int memory_cache_disk; + int access_sibling_for_stale_resource; } onoff; int forward_max_tries;