refresh.cc
Go to the documentation of this file.
74};
83static int refreshStaleness(const StoreEntry * entry, time_t check_time, const time_t age, const RefreshPattern * R, stale_flags * sf);
139refreshStaleness(const StoreEntry * entry, time_t check_time, const time_t age, const RefreshPattern * R, stale_flags * sf)
192 debugs(22, 3, "FRESH: age (" << age << " sec) is less than configured minimum (" << R->min << " sec)");
198 debugs(22, 3, "STALE: No explicit expiry, no last modified, and older than configured minimum.");
389 debugs(22, 3, "MAYBE: Ignoring client reload request - trying to serve from cache (ignore-reload option)");
395 debugs(22, 3, "YES: Client reload request - cheating, only revalidating with origin (reload-into-ims option)");
415 debugs(22, 3, "MAYBE: Ignoring client CC:max-age=" << maxAge << " request - 'Cache-Control: immutable'");
420 debugs(22, 3, "MAYBE: Ignoring client reload request - trying to serve from cache (ignore-reload option)");
437 debugs(22, 3, "NO: Client accepts a stale response - 'Cache-Control: max-stale=" << maxStale << "'");
482 debugs(22, 3, "NO: Serving from cache - even though explicit expiry has passed, we enforce Min value (override-expire option)");
496 debugs(22, 3, "NO: Serving from cache - even though L-M factor says the object is stale, we enforce Min value (override-lastmod option)");
645refreshCountsStatsEntry(StoreEntry * sentry, struct RefreshCounts &rc, int code, const char *desc)
647 storeAppendPrintf(sentry, "%6d\t%6.2f\t%s\n", rc.status[code], xpercent(rc.status[code], rc.total), desc);
660 refreshCountsStatsEntry(sentry, rc, FRESH_REQUEST_MAX_STALE_ALL, "Fresh: request max-stale wildcard");
661 refreshCountsStatsEntry(sentry, rc, FRESH_REQUEST_MAX_STALE_VALUE, "Fresh: request max-stale value");
663 refreshCountsStatsEntry(sentry, rc, FRESH_LMFACTOR_RULE, "Fresh: refresh_pattern last-mod factor percentage");
665 refreshCountsStatsEntry(sentry, rc, FRESH_OVERRIDE_EXPIRES, "Fresh: refresh_pattern override-expires");
666 refreshCountsStatsEntry(sentry, rc, FRESH_OVERRIDE_LASTMOD, "Fresh: refresh_pattern override-lastmod");
667 refreshCountsStatsEntry(sentry, rc, STALE_MUST_REVALIDATE, "Stale: response has must-revalidate");
669 refreshCountsStatsEntry(sentry, rc, STALE_FORCED_RELOAD, "Stale: request has no-cache directive");
670 refreshCountsStatsEntry(sentry, rc, STALE_EXCEEDS_REQUEST_MAX_AGE_VALUE, "Stale: age exceeds request max-age value");
673 refreshCountsStatsEntry(sentry, rc, STALE_LMFACTOR_RULE, "Stale: refresh_pattern last-mod factor percentage");
Definition: HttpHdrCc.h:44
bool hasStaleIfError(int32_t *val=nullptr) const
Definition: HttpHdrCc.h:150
Definition: HttpRequest.h:49
const SBuf & effectiveRequestUri() const
RFC 7230 section 5.5 - Effective Request URI.
Definition: HttpRequest.cc:744
Definition: PackableStream.h:76
struct RefreshPattern::@89 flags
void printPattern(std::ostream &os) const
reports the configured pattern or a fake pattern of the implicit rule
Definition: refresh.cc:728
const RegexPattern & regex() const
configured regex; do not use except when iterating configured rules
Definition: refresh.cc:721
RegexPointer regex_
configured regex or, for the implicit refresh_pattern rule, nil
Definition: RefreshPattern.h:92
void printHead(std::ostream &) const
reports configuration excluding trailing options
Definition: refresh.cc:737
Definition: RegexPattern.h:24
struct SquidConfig::@106 onoff
Definition: Store.h:42
void RegisterAction(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
Definition: Registration.cc:16
static int refreshCountsStatsEntry(StoreEntry *sentry, struct RefreshCounts &rc, int code, const char *desc)
Definition: refresh.cc:645
int refreshCheckHTCP(const StoreEntry *entry, HttpRequest *request)
Definition: refresh.cc:598
static struct RefreshCounts refreshCounts[rcCount]
static int refreshCheck(const StoreEntry *entry, HttpRequest *request, time_t delta)
Definition: refresh.cc:257
static void refreshCountsStats(StoreEntry *sentry, struct RefreshCounts &rc)
Definition: refresh.cc:652
static int refreshStaleness(const StoreEntry *entry, time_t check_time, const time_t age, const RefreshPattern *R, stale_flags *sf)
Definition: refresh.cc:139
int refreshCheckICP(const StoreEntry *entry, HttpRequest *request)
Definition: refresh.cc:587
static bool refreshIsStaleIfHit(const int reason)
whether reply is stale if it is a hit
Definition: refresh.cc:554
int refreshCheckDigest(const StoreEntry *entry, time_t delta)
Definition: refresh.cc:611
static void refreshRegisterWithCacheManager(void)
Definition: refresh.cc:748
static RefreshPattern DefaultRefresh(nullptr)
int refreshCheckHTTP(const StoreEntry *entry, HttpRequest *request)
Definition: refresh.cc:575
static const RefreshPattern * refreshFirstDotRule()
the first explicit refresh_pattern rule that uses a "." regex (or nil)
Definition: refresh.cc:107
Definition: refresh.cc:76
Definition: refresh.cc:44