Sat Oct 30 22:27:53 CEST 1999 Modified Files in squid/src cf.data.pre http.c structs.h Merged squid-2.3.DEVEL2.allow_miss_peer_option.patch Squid-2.3.DEVEL2: 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.41.2.1 squid/src/cf.data.pre:1.1.1.41.2.2 --- squid/src/cf.data.pre:1.1.1.41.2.1 Sat Oct 30 22:21:07 1999 +++ squid/src/cf.data.pre Sat Oct 30 22:27:51 1999 @@ -235,6 +235,7 @@ login=user:password connect-timeout=nn digest-url=url + allow-miss use 'proxy-only' to specify that objects fetched from this cache should not be saved locally. @@ -292,11 +293,19 @@ the specified URL rather than the Squid default location. + 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. (for example to deny peer usage on + requests from peer by denying cache_peer_access if the + source is a peer) + NOTE: non-ICP neighbors must be specified as 'parent'. cache_peer hostname type 3128 3130 DOC_END - NAME: cache_peer_domain cache_host_domain TYPE: hostdomain Index: squid/src/http.c diff -u squid/src/http.c:1.1.1.39 squid/src/http.c:1.1.1.39.2.1 --- squid/src/http.c:1.1.1.39 Sat Oct 30 13:25:05 1999 +++ squid/src/http.c Sat Oct 30 22:27:52 1999 @@ -851,7 +851,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/structs.h diff -u squid/src/structs.h:1.1.1.42.2.4 squid/src/structs.h:1.1.1.42.2.5 --- squid/src/structs.h:1.1.1.42.2.4 Sat Oct 30 22:22:44 1999 +++ squid/src/structs.h Sat Oct 30 22:27:52 1999 @@ -1078,6 +1078,7 @@ #if DELAY_POOLS unsigned int no_delay:1; #endif + unsigned int allow_miss:1; } options; int weight; struct { Index: squid/src/cache_cf.c diff -u squid/src/cache_cf.c:1.1.1.35.2.1 squid/src/cache_cf.c:1.1.1.35.2.2 --- squid/src/cache_cf.c:1.1.1.35.2.1 Sat Oct 30 22:20:31 1999 +++ squid/src/cache_cf.c Sat Oct 30 23:08:24 1999 @@ -985,6 +985,8 @@ } else if (!strncasecmp(token, "digest-url=", 11)) { p->digest_url = xstrdup(token + 11); #endif + } else if (!strcasecmp(token, "allow-miss")) { + p->options.allow_miss = 1; } else { debug(3, 0) ("parse_peer: token='%s'\n", token); self_destruct();