Page Speed Optimization Libraries
1.8.31.3
|
#include "cache_html_flow.h"
Static Public Member Functions | |
static void | Start (const GoogleString &url, AsyncFetch *base_fetch, RewriteDriver *driver, ProxyFetchFactory *factory, ProxyFetchPropertyCallbackCollector *property_callback) |
static void | InitStats (Statistics *statistics) |
Static Public Attributes | |
static const char | kBackgroundComputationDone [] |
static const char | kNumCacheHtmlHits [] |
static const char | kNumCacheHtmlMisses [] |
static const char | kNumCacheHtmlMatches [] |
static const char | kNumCacheHtmlMismatches [] |
static const char | kNumCacheHtmlMismatchesCacheDeletes [] |
static const char | kNumCacheHtmlSmartdiffMatches [] |
static const char | kNumCacheHtmlSmartdiffMismatches [] |
CacheHtmlFlow manages the flow for an html request where we can flush a cached html to the client before receiving a response from the origin server. In order to flush the html early before we start getting bytes back from the fetcher, we lookup property cache for CacheHtmlInfo. If found, we flush cached html out (with the non cacheable parts removed) and then trigger the normal ProxyFetch flow which extracts cookies and non cacheable parts from the page and sends it out. If CacheHtmlInfo is not found in cache, we pass this request through normal ProxyFetch flow buffering the html. In the background we create a driver to parse it, remove the non-cacheable parts, compute CacheHtmlInfo and store it into the property cache.
const char net_instaweb::CacheHtmlFlow::kBackgroundComputationDone[] [static] |
Identifies the sync-point for reproducing races between foreground serving request and background cache html computation requests in tests.