Page Speed Optimization Libraries
1.6.29.3
|
#include "cache_stats.h"
Public Member Functions | |
CacheStats (StringPiece prefix, CacheInterface *cache, Timer *timer, Statistics *statistics) | |
Doees not takes ownership of the cache, timer, or statistics. | |
virtual void | Get (const GoogleString &key, Callback *callback) |
virtual void | MultiGet (MultiGetRequest *request) |
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 void | InitStats (StringPiece prefix, Statistics *statistics) |
This must be called once for every unique cache prefix. | |
static GoogleString | FormatName (StringPiece prefix, StringPiece cache) |
Friends | |
class | StatsCallback |
Wrapper around a CacheInterface that adds statistics and histograms for hit-rate, latency, etc. As there can be multiple caches in a system (l1, l2, etc), the constructor takes a string prefix so they can be measured independently.