19 #ifndef PAGESPEED_KERNEL_HTTP_CACHING_HEADERS_H_
20 #define PAGESPEED_KERNEL_HTTP_CACHING_HEADERS_H_
22 #include "base/logging.h"
27 namespace net_instaweb {
47 virtual bool Lookup(
const StringPiece& key, StringPieceVector* values) = 0;
100 bool IsRedirectStatusCode()
const;
102 int status_code()
const {
return status_code_; }
109 void ParseCacheControlIfNecessary();
113 bool IsHeuristicallyCacheable();
117 bool ComputeIsCacheable();
118 bool ComputeIsProxyCacheable();
119 bool ComputeIsHeuristicallyCacheable();
120 bool ComputeFreshnessLifetimeMillis(int64* out_freshness_lifetime_millis);
121 bool ComputeHasExplicitNoCacheDirective();
124 template<
class T>
class Optional {
126 Optional() : has_value_(false) {}
129 bool has_value()
const {
return has_value_; }
137 void set_value(T value) {
151 bool parsed_cache_control_;
159 bool must_revalidate_;
160 bool proxy_revalidate_;
163 bool cache_control_parse_error_;
164 bool expires_invalid_;
165 Optional<int> max_age_seconds_;
166 Optional<int64> expires_ms_;
170 Optional<int64> freshness_lifetime_millis_;
171 Optional<bool> is_cacheable_;
172 Optional<bool> is_proxy_cacheable_;
173 Optional<bool> is_explicitly_cacheable_;
174 Optional<bool> is_heuristically_cacheable_;
175 Optional<bool> has_explicit_no_cache_directive_;
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24