Page Speed Optimization Libraries
1.6.29.3
|
#include "threadsafe_cache.h"
Public Member Functions | |
ThreadsafeCache (CacheInterface *cache, AbstractMutex *mutex) | |
Does not takes ownership of cache. Takes ownership of mutex. | |
virtual void | Get (const GoogleString &key, Callback *callback) |
virtual void | Put (const GoogleString &key, SharedString *value) |
virtual void | Delete (const GoogleString &key) |
virtual CacheInterface * | Backend () |
virtual bool | IsBlocking () const |
virtual bool | IsHealthy () const |
virtual void | ShutDown () |
virtual GoogleString | Name () const |
Static Public Member Functions | |
static GoogleString | FormatName (StringPiece cache) |
Composes a cache with a Mutex to form a threadsafe cache. Note that cache callbacks will be run in a thread that is dependent on the cache implementation. This wrapper class just guarantees the thread safety of the cache itself, not the callbacks.