Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
net_instaweb::HttpCacheFailure Class Reference

Static Public Member Functions

static FetchResponseStatus ClassifyFailure (const ResponseHeaders &headers, StringPiece contents, bool physical_fetch_success, bool external_cacheable)
 
static bool IsFailureCachingStatus (HttpStatus::Code code)
 Returns true if the given status code is used to remember failure.
 
static FetchResponseStatus DecodeFailureCachingStatus (HttpStatus::Code code)
 
static HttpStatus::Code EncodeFailureCachingStatus (FetchResponseStatus status)
 

Member Function Documentation

static FetchResponseStatus net_instaweb::HttpCacheFailure::ClassifyFailure ( const ResponseHeaders headers,
StringPiece  contents,
bool  physical_fetch_success,
bool  external_cacheable 
)
static

Classify results of a fetch as success, or as particular kind of failure, based on fetch results (including headers and contents).

The "is this cacheable" bit is injected from external computation so this code doesn't have to worry about all the various knobs we have for overriding TTL.

Parameters
external_cacheablee.g. what Done() said
static FetchResponseStatus net_instaweb::HttpCacheFailure::DecodeFailureCachingStatus ( HttpStatus::Code  code)
static

These two methods are used to convert between failure status classification and the magic status codes we use to remember such failures in HTTP cache.


The documentation for this class was generated from the following file: