HttpHdrCc.h
Go to the documentation of this file.
37};
74 bool hasPrivate(const String **val = nullptr) const { return hasDirective(HttpHdrCcType::CC_PRIVATE, &private_, val); }
89 bool hasNoCache(const String **val = nullptr) const { return hasDirective(HttpHdrCcType::CC_NO_CACHE, &no_cache, val); }
122 bool hasMaxAge(int32_t *val = nullptr) const { return hasDirective(HttpHdrCcType::CC_MAX_AGE, max_age, val); }
127 bool hasSMaxAge(int32_t *val = nullptr) const { return hasDirective(HttpHdrCcType::CC_S_MAXAGE, s_maxage, val); }
132 bool hasMaxStale(int32_t *val = nullptr) const { return hasDirective(HttpHdrCcType::CC_MAX_STALE, max_stale, val); }
140 bool hasMinFresh(int32_t *val = nullptr) const { return hasDirective(HttpHdrCcType::CC_MIN_FRESH, min_fresh, val); }
141 void minFresh(int32_t v) {if (v < 0) return; setValue(min_fresh,v,HttpHdrCcType::CC_MIN_FRESH); }
150 bool hasStaleIfError(int32_t *val = nullptr) const { return hasDirective(HttpHdrCcType::CC_STALE_IF_ERROR, stale_if_error, val); }
152 void clearStaleIfError() {setValue(stale_if_error,STALE_IF_ERROR_UNKNOWN,HttpHdrCcType::CC_STALE_IF_ERROR,false);}
184 bool hasDirective(const HttpHdrCcType hdrType, const Value &parsedVal, Value *outVal = nullptr) const {
void httpHdrCcUpdateStats(const HttpHdrCc *cc, StatHist *hist)
Definition: HttpHdrCc.cc:321
void httpHdrCcStatDumper(StoreEntry *sentry, int idx, double val, double size, int count)
Definition: HttpHdrCc.cc:331
Definition: HttpHdrCc.h:44
MEMPROXY_CLASS(HttpHdrCc)
bool hasDirective(const HttpHdrCcType hdrType, const Value &parsedVal, Value *outVal=nullptr) const
implements typical has*() method logic
Definition: HttpHdrCc.h:184
String no_cache
List of headers sent as value for CC:no-cache="...". May be empty/undefined if the value is missing.
Definition: HttpHdrCc.h:180
static const int32_t STALE_IF_ERROR_UNKNOWN
Definition: HttpHdrCc.h:54
bool hasNoCacheWithoutParameters() const
Definition: HttpHdrCc.h:88
void setMask(HttpHdrCcType id, bool newval=true)
low-level part of the public set method, performs no checks
Definition: HttpHdrCc.h:194
bool parse(const String &s)
parse a header-string and fill in appropriate values.
Definition: HttpHdrCc.cc:95
bool isSet(HttpHdrCcType id) const
check whether the attribute value supplied by id is set
Definition: HttpHdrCc.h:160
String private_
List of headers sent as value for CC:private="...". May be empty/undefined if the value is missing.
Definition: HttpHdrCc.h:179
void setValue(int32_t &value, int32_t new_value, HttpHdrCcType hdr, bool setting=true)
Definition: HttpHdrCc.cc:78
bool hasStaleIfError(int32_t *val=nullptr) const
Definition: HttpHdrCc.h:150
Definition: Packable.h:53
Definition: StatHist.h:26
Definition: Store.h:42
Definition: SquidString.h:26