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

Public Member Functions

 CachePropertyStore (const GoogleString &cache_key_prefix, CacheInterface *cache, Timer *timer, Statistics *stats, ThreadSystem *thread_system)
 
virtual void Get (const GoogleString &url, const GoogleString &options_signature_hash, const GoogleString &cache_key_suffix, const PropertyCache::CohortVector &cohort_list, PropertyPage *page, BoolCallback *done, AbstractPropertyStoreGetCallback **callback)
 
virtual void Put (const GoogleString &url, const GoogleString &options_signature_hash, const GoogleString &cache_key_suffix, const PropertyCache::Cohort *cohort, const PropertyCacheValues *values, BoolCallback *done)
 Write to cache.
 
void AddCohort (const GoogleString &cohort)
 Establishes a Cohort backed by the CacheInteface passed to the constructor.
 
void AddCohortWithCache (const GoogleString &cohort, CacheInterface *cache)
 
GoogleString CacheKey (const StringPiece &url, const StringPiece &options_signature_hash, const StringPiece &cache_key_suffix, const PropertyCache::Cohort *cohort) const
 
const CacheInterfacecache_backend ()
 Returns default cache backend associated with CachePropertyStore.
 
virtual GoogleString Name () const
 
- Public Member Functions inherited from net_instaweb::PropertyStore
bool enable_get_cancellation ()
 
void set_enable_get_cancellation (bool x)
 

Static Public Member Functions

static GoogleString FormatName3 (StringPiece cohort_name1, StringPiece cohort_cache1, StringPiece cohort_name2, StringPiece cohort_cache2, StringPiece cohort_name3, StringPiece cohort_cache3)
 

Static Public Attributes

static const char kPagePropertyCacheKeyPrefix []
 Property cache key prefixes.
 

Additional Inherited Members

- Public Types inherited from net_instaweb::PropertyStore
typedef Callback1< bool > BoolCallback
 

Constructor & Destructor Documentation

net_instaweb::CachePropertyStore::CachePropertyStore ( const GoogleString cache_key_prefix,
CacheInterface cache,
Timer timer,
Statistics stats,
ThreadSystem thread_system 
)

Does not take the ownership of cache, timer and stats object. L2-only caches should be used for CachePropertyStore. We cannot use the L1 cache because this data can get stale quickly.

Member Function Documentation

void net_instaweb::CachePropertyStore::AddCohortWithCache ( const GoogleString cohort,
CacheInterface cache 
)

Establishes a Cohort to be backed by the specified CacheInterface. Does not take the ownership of cache.

GoogleString net_instaweb::CachePropertyStore::CacheKey ( const StringPiece &  url,
const StringPiece &  options_signature_hash,
const StringPiece &  cache_key_suffix,
const PropertyCache::Cohort cohort 
) const

Gets the underlying key associated with cache_key and a Cohort. This is the key used for the CacheInterface provided to the constructor. This is made visible for testing, to make it possible to inject delays into the cache via DelayCache::DelayKey.

virtual void net_instaweb::CachePropertyStore::Get ( const GoogleString url,
const GoogleString options_signature_hash,
const GoogleString cache_key_suffix,
const PropertyCache::CohortVector &  cohort_list,
PropertyPage page,
BoolCallback done,
AbstractPropertyStoreGetCallback **  callback 
)
virtual

Cache lookup is initiated for the given cohort and results are populated in PropertyPage if it is valid. callback parameter can be set to NULL if cohort_list is empty.

Implements net_instaweb::PropertyStore.

virtual GoogleString net_instaweb::CachePropertyStore::Name ( ) const
virtual

The name of this PropertyStore – used for logging and debugging.

It is strongly recommended that you provide a static GoogleString FormatName(...) method for use in formatting the Name() return, and in testing, e.g. in third_party/pagespeed/system/system_caches_test.cc.

Implements net_instaweb::PropertyStore.


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