refresh.cc
Go to the documentation of this file.
83 static int refreshStaleness(const StoreEntry * entry, time_t check_time, const time_t age, const RefreshPattern * R, stale_flags * sf);
139 refreshStaleness(const StoreEntry * entry, time_t check_time, const time_t age, const RefreshPattern * R, stale_flags * sf)
188 debugs(22, 3, "FRESH: age (" << age << " sec) is less than configured minimum (" << R->min << " sec)");
194 debugs(22, 3, "STALE: No explicit expiry, no last modified, and older than configured minimum.");
385 debugs(22, 3, "MAYBE: Ignoring client reload request - trying to serve from cache (ignore-reload option)");
391 debugs(22, 3, "YES: Client reload request - cheating, only revalidating with origin (reload-into-ims option)");
411 debugs(22, 3, "MAYBE: Ignoring client CC:max-age=" << maxAge << " request - 'Cache-Control: immutable'");
416 debugs(22, 3, "MAYBE: Ignoring client reload request - trying to serve from cache (ignore-reload option)");
433 debugs(22, 3, "NO: Client accepts a stale response - 'Cache-Control: max-stale=" << maxStale << "'");
478 debugs(22, 3, "NO: Serving from cache - even though explicit expiry has passed, we enforce Min value (override-expire option)");
495 debugs(22, 3, "NO: Serving from cache - even though L-M factor says the object is stale, we enforce Min value (override-lastmod option)");
651 refreshCountsStatsEntry(StoreEntry * sentry, struct RefreshCounts &rc, int code, const char *desc)
653 storeAppendPrintf(sentry, "%6d\t%6.2f\t%s\n", rc.status[code], xpercent(rc.status[code], rc.total), desc);
666 refreshCountsStatsEntry(sentry, rc, FRESH_REQUEST_MAX_STALE_ALL, "Fresh: request max-stale wildcard");
667 refreshCountsStatsEntry(sentry, rc, FRESH_REQUEST_MAX_STALE_VALUE, "Fresh: request max-stale value");
669 refreshCountsStatsEntry(sentry, rc, FRESH_LMFACTOR_RULE, "Fresh: refresh_pattern last-mod factor percentage");
671 refreshCountsStatsEntry(sentry, rc, FRESH_OVERRIDE_EXPIRES, "Fresh: refresh_pattern override-expires");
672 refreshCountsStatsEntry(sentry, rc, FRESH_OVERRIDE_LASTMOD, "Fresh: refresh_pattern override-lastmod");
673 refreshCountsStatsEntry(sentry, rc, STALE_MUST_REVALIDATE, "Stale: response has must-revalidate");
675 refreshCountsStatsEntry(sentry, rc, STALE_FORCED_RELOAD, "Stale: request has no-cache directive");
676 refreshCountsStatsEntry(sentry, rc, STALE_EXCEEDS_REQUEST_MAX_AGE_VALUE, "Stale: age exceeds request max-age value");
679 refreshCountsStatsEntry(sentry, rc, STALE_LMFACTOR_RULE, "Stale: refresh_pattern last-mod factor percentage");
static int refreshCountsStatsEntry(StoreEntry *sentry, struct RefreshCounts &rc, int code, const char *desc)
Definition: refresh.cc:651
Definition: HttpHdrCc.h:43
int refreshCheckICP(const StoreEntry *entry, HttpRequest *request)
Definition: refresh.cc:593
struct SquidConfig::@97 onoff
int refreshCheckHTCP(const StoreEntry *entry, HttpRequest *request)
Definition: refresh.cc:604
Definition: PackableStream.h:75
int refreshCheckHTTP(const StoreEntry *entry, HttpRequest *request)
Definition: refresh.cc:582
Definition: refresh.cc:76
static void refreshCountsStats(StoreEntry *sentry, struct RefreshCounts &rc)
Definition: refresh.cc:658
Definition: RegexPattern.h:23
Definition: HttpRequest.h:48
struct RefreshPattern::@80 flags
Definition: refresh.cc:44
static struct RefreshCounts refreshCounts[rcCount]
static void refreshRegisterWithCacheManager(void)
Definition: refresh.cc:754
const RegexPattern & regex() const
configured regex; do not use except when iterating configured rules
Definition: refresh.cc:727
static const RefreshPattern * refreshFirstDotRule()
the first explicit refresh_pattern rule that uses a "." regex (or nil)
Definition: refresh.cc:107
static int refreshCheck(const StoreEntry *entry, HttpRequest *request, time_t delta)
Definition: refresh.cc:253
RegexPointer regex_
configured regex or, for the implicit refresh_pattern rule, nil
Definition: RefreshPattern.h:92
bool hasStaleIfError(int32_t *val=nullptr) const
Definition: HttpHdrCc.h:150
Definition: Store.h:37
static int refreshStaleness(const StoreEntry *entry, time_t check_time, const time_t age, const RefreshPattern *R, stale_flags *sf)
Definition: refresh.cc:139
static bool refreshIsStaleIfHit(const int reason)
whether reply is stale if it is a hit
Definition: refresh.cc:557
void RegisterAction(char const *action, char const *desc, OBJH *handler, Protected, Atomic, Format)
Definition: Registration.cc:54
static RefreshPattern DefaultRefresh(nullptr)
int refreshCheckDigest(const StoreEntry *entry, time_t delta)
Definition: refresh.cc:617
void printPattern(std::ostream &os) const
reports the configured pattern or a fake pattern of the implicit rule
Definition: refresh.cc:734
const SBuf & effectiveRequestUri() const
RFC 7230 section 5.5 - Effective Request URI.
Definition: HttpRequest.cc:744
void printHead(std::ostream &) const
reports configuration excluding trailing options
Definition: refresh.cc:743
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products