Squid-2.2.STABLE2: allow-miss cache_peer option allow-miss cache peer option to disable the use of "only-if-cached" on requests to siblings. This can be useful in some peering arrangements where icp_hit_stale is enabled. Index: squid/src/cf.data.pre diff -u squid/src/cf.data.pre:1.1.1.35.2.3 squid/src/cf.data.pre:1.1.1.35.2.4 --- squid/src/cf.data.pre:1.1.1.35.2.3 Wed May 5 11:33:48 1999 +++ squid/src/cf.data.pre Fri May 14 00:15:55 1999 @@ -229,6 +229,7 @@ no-delay login=user:password connect-timeout=nn + allow-miss use 'proxy-only' to specify that objects fetched from this cache should not be saved locally. @@ -279,6 +280,13 @@ use 'connect-timeout=nn' to specify a peer specific connect timeout (see also peer_connect_timeout directive) + + use 'allow-miss' to disable Squid's use of only-if-cached + when forwarding requests to siblings. This is primarily + useful when icp_hit_stale is used by the sibling. To + extensive use of this option may result in forwarding + loops, and you should avoid having two-way peerings + with this option. NOTE: non-ICP neighbors must be specified as 'parent'. Index: squid/src/structs.h diff -u squid/src/structs.h:1.1.1.37.6.4 squid/src/structs.h:1.1.1.37.6.5 --- squid/src/structs.h:1.1.1.37.6.4 Sun May 9 07:50:44 1999 +++ squid/src/structs.h Fri May 14 00:15:56 1999 @@ -1042,6 +1042,7 @@ #if DELAY_POOLS unsigned int no_delay:1; #endif + unsigned int allow_miss:1; } options; int weight; struct { Index: squid/src/http.c diff -u squid/src/http.c:1.1.1.32.6.1 squid/src/http.c:1.1.1.32.6.2 --- squid/src/http.c:1.1.1.32.6.1 Sun May 2 16:18:36 1999 +++ squid/src/http.c Fri May 14 00:15:56 1999 @@ -842,7 +842,8 @@ else if ((double) p->stats.n_keepalives_recv / (double) p->stats.n_keepalives_sent > 0.50) httpState->flags.keepalive = 1; if (httpState->peer) - if (neighborType(httpState->peer, httpState->request) == PEER_SIBLING) + if (neighborType(httpState->peer, httpState->request) == PEER_SIBLING && + !httpState->peer->options.allow_miss) httpState->flags.only_if_cached = 1; memBufDefInit(&mb); httpBuildRequestPrefix(req, Index: squid/src/cache_cf.c diff -u squid/src/cache_cf.c:1.1.1.29.4.2 squid/src/cache_cf.c:1.1.1.29.4.3 --- squid/src/cache_cf.c:1.1.1.29.4.2 Thu Apr 29 14:41:59 1999 +++ squid/src/cache_cf.c Sat May 15 22:28:10 1999 @@ -1049,6 +1049,8 @@ p->login = xstrdup(token + 6); } else if (!strncasecmp(token, "connect-timeout=", 16)) { p->connect_timeout = atoi(token+16); + } else if (!strcasecmp(token, "allow-miss")) { + p->options.allow_miss = 1; } else { debug(3, 0) ("parse_peer: token='%s'\n", token); self_destruct();