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 | Static Public Attributes | Friends
net_instaweb::WriteThroughCache Class Reference

Composes two caches to form a write-through cache. More...

#include "write_through_cache.h"

List of all members.

Public Member Functions

 WriteThroughCache (CacheInterface *cache1, CacheInterface *cache2)
 Does not take ownership of caches passed in.
virtual void Get (const GoogleString &key, Callback *callback)
virtual void Put (const GoogleString &key, SharedString *value)
virtual void Delete (const GoogleString &key)
void set_cache1_limit (size_t limit)
size_t cache1_limit () const
CacheInterface * cache1 ()
CacheInterface * cache2 ()
virtual bool IsBlocking () const
virtual bool IsHealthy () const
virtual void ShutDown ()
virtual GoogleString Name () const

Static Public Member Functions

static GoogleString FormatName (StringPiece l1, StringPiece l2)

Static Public Attributes

static const size_t kUnlimited

Friends

class WriteThroughCallback

Detailed Description

Composes two caches to form a write-through cache.


Member Function Documentation

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

We can fulfill our guarantee only if both caches block.

void net_instaweb::WriteThroughCache::set_cache1_limit ( size_t  limit) [inline]

By default, all data goes into both cache1 and cache2. But if you only want to put small items in cache1, you can set the size limit. Note that both the key and value will count torward the size.


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