Page Speed Optimization Libraries
1.5.27.2
|
#include "critical_selector_finder.h"
Public Member Functions | |
CriticalSelectorFinder (StringPiece cohort, Statistics *stats) | |
CriticalSelectorSet * | DecodeCriticalSelectorsFromPropertyCache (RewriteDriver *driver) |
void | WriteCriticalSelectorsToPropertyCache (const StringSet &selector_set, RewriteDriver *driver) |
void | WriteCriticalSelectorsToPropertyCache (const StringSet &selector_set, const PropertyCache *cache, PropertyPage *page, MessageHandler *message_handler) |
int | NumSetsToKeep () const |
Get the number of critical selector beacon results to keep. | |
Static Public Member Functions | |
static void | InitStats (Statistics *statistics) |
Static Public Attributes | |
static const char | kCriticalSelectorsValidCount [] |
static const char | kCriticalSelectorsExpiredCount [] |
static const char | kCriticalSelectorsNotFoundCount [] |
static const char | kCriticalSelectorsPropertyName [] |
Interface to store/retrieve critical selector information in the property cache.
CriticalSelectorSet* net_instaweb::CriticalSelectorFinder::DecodeCriticalSelectorsFromPropertyCache | ( | RewriteDriver * | driver | ) |
Reads the recorded selector set from the property cache, and demarshals it. Allocates a fresh object, transferring ownership of it to the caller. May return NULL if no currently valid set is available.
void net_instaweb::CriticalSelectorFinder::WriteCriticalSelectorsToPropertyCache | ( | const StringSet & | selector_set, |
RewriteDriver * | driver | ||
) |
Updates the critical selectors in the property cache. The new selector_set is added to the list of previous beacon responses, and the critical_selectors field is recomputed by taking the union of the selectors in the previous NumSetsToKeep() sets. This updates the value in the in-memory property page but does not write the cohort.