Page Speed Optimization Libraries  1.6.29.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
net_instaweb::FallbackCache Class Reference

#include "fallback_cache.h"

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

virtual bool net_instaweb::FallbackCache::IsBlocking ( ) const [inline, virtual]

We can fulfill our guarantee only if both caches block.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines