#
-# $Id: cf.data.pre,v 1.117 1998/10/08 20:10:15 wessels Exp $
+# $Id: cf.data.pre,v 1.118 1998/10/09 17:52:54 wessels Exp $
#
#
# SQUID Internet Object Cache http://squid.nlanr.net/Squid/
LOC: Config.Refresh
DEFAULT: none
DOC_START
- usage: refresh_pattern regex min percent max [options]
+ usage: refresh_pattern [-i] regex min percent max [options]
+
+ By default, regular expressions are CASE-SENSITIVE. To make
+ them case-insensitive, use the -i option.
min and max are specified in MINUTES.
percent is an integer number.
/*
- * $Id: client_side.cc,v 1.408 1998/10/08 20:10:17 wessels Exp $
+ * $Id: client_side.cc,v 1.409 1998/10/09 17:52:56 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
debug(33, 1) ("clientKeepaliveNextRequest: FD %d Sending next\n",
conn->fd);
entry = http->entry;
+ assert(entry);
if (0 == storeClientCopyPending(entry, http)) {
if (entry->store_status == STORE_ABORTED)
debug(33, 0) ("clientKeepaliveNextRequest: entry->swap_status == STORE_ABORTED\n");
clientProcessRequest2(clientHttpRequest * http)
{
const request_t *r = http->request;
- const cache_key *key;
StoreEntry *e;
- key = storeKeyPublic(http->uri, r->method);
e = http->entry = storeGetPublic(http->uri, r->method);
if (r->method == METHOD_HEAD && e == NULL) {
/* We can generate a HEAD reply from a cached GET object */
- key = storeKeyPublic(http->uri, METHOD_GET);
e = http->entry = storeGetPublic(http->uri, METHOD_GET);
}
#if USE_CACHE_DIGESTS
#endif
if (NULL == e) {
/* this object isn't in the cache */
+ debug(33,3)("clientProcessRequest2: storeGet() MISS\n");
return LOG_TCP_MISS;
}
if (Config.onoff.offline) {
+ debug(33,3)("clientProcessRequest2: offline HIT\n");
http->entry = e;
return LOG_TCP_HIT;
}
if (!storeEntryValidToSend(e)) {
+ debug(33,3)("clientProcessRequest2: !storeEntryValidToSend MISS\n");
http->entry = NULL;
return LOG_TCP_MISS;
}
if (EBIT_TEST(e->flags, ENTRY_SPECIAL)) {
/* Special entries are always hits, no matter what the client says */
+ debug(33,3)("clientProcessRequest2: ENTRY_SPECIAL HIT\n");
http->entry = e;
return LOG_TCP_HIT;
}
}
#endif
if (r->flags.nocache) {
+ debug(33,3)("clientProcessRequest2: no-cache REFRESH MISS\n");
http->entry = NULL;
ipcacheReleaseInvalid(r->host);
return LOG_TCP_CLIENT_REFRESH_MISS;
- } else if (r->range && httpHdrRangeWillBeComplex(r->range)) {
- /* Some clients break if we return "200 OK" for a Range request.
- * We would have to return "200 OK" for a _complex_ Range request
- * that is also a HIT. Thus, let's prevent HITs on complex Range requests */
+ }
+ if (r->range && httpHdrRangeWillBeComplex(r->range)) {
+ /*
+ * Some clients break if we return "200 OK" for a Range
+ * request. We would have to return "200 OK" for a _complex_
+ * Range request that is also a HIT. Thus, let's prevent HITs
+ * on complex Range requests
+ */
+ debug(33,3)("clientProcessRequest2: complex range MISS\n");
http->entry = NULL;
return LOG_TCP_MISS;
}
+ debug(33,3)("clientProcessRequest2: default HIT\n");
http->entry = e;
return LOG_TCP_HIT;
}