Page Speed Optimization Libraries
1.6.29.3
|
#include "fallback_cache.h"
Public Member Functions | |
FallbackCache (CacheInterface *small_object_cache, CacheInterface *large_object_cache, int threshold_bytes, MessageHandler *handler) | |
virtual void | Get (const GoogleString &key, Callback *callback) |
virtual void | Put (const GoogleString &key, SharedString *value) |
virtual void | Delete (const GoogleString &key) |
virtual void | MultiGet (MultiGetRequest *request) |
virtual bool | IsBlocking () const |
virtual bool | IsHealthy () const |
virtual void | ShutDown () |
virtual GoogleString | Name () const |
Static Public Member Functions | |
static GoogleString | FormatName (StringPiece small, StringPiece large) |
Provides a mechanism to handle small objects with one cache, and large objects with another cache. This is not a write-through cache; the objects stored in small_object_cache are not stored in large_object_cache, though objects stored in large_object_cache require a flag in small_object_cache that guides Get to look in the large one.
net_instaweb::FallbackCache::FallbackCache | ( | CacheInterface * | small_object_cache, |
CacheInterface * | large_object_cache, | ||
int | threshold_bytes, | ||
MessageHandler * | handler | ||
) |
FallbackCache does not take ownership of either cache that's passed in.
The threshold is compared against the key-size + value-size on put.
virtual bool net_instaweb::FallbackCache::IsBlocking | ( | ) | const [inline, virtual] |
We can fulfill our guarantee only if both caches block.