Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::DelegatingCacheCallback Class Reference

#include "delegating_cache_callback.h"

Inheritance diagram for net_instaweb::DelegatingCacheCallback:

Public Member Functions

 DelegatingCacheCallback (CacheInterface::Callback *callback)
virtual bool ValidateCandidate (const GoogleString &key, CacheInterface::KeyState state)
virtual void Done (CacheInterface::KeyState state)
- Public Member Functions inherited from net_instaweb::CacheInterface::Callback
void set_value (const SharedString &value)
const SharedStringvalue () const
bool DelegatedValidateCandidate (const GoogleString &key, KeyState state)
void DelegatedDone (KeyState state)

Additional Inherited Members

Detailed Description

Helper class for implementing Caches that wrap other caches, adding functionality in callbacks.

Member Function Documentation

virtual void net_instaweb::DelegatingCacheCallback::Done ( CacheInterface::KeyState  state)

This method is called once the cache implementation has found a match that was accepted by ValidateCandidate (in which case state == kAvailable) or it has failed to do so (state == kNotFound).

Implementations are free to invoke cache operations, as all cache locks are guaranteed to be released.

Implements net_instaweb::CacheInterface::Callback.

virtual bool net_instaweb::DelegatingCacheCallback::ValidateCandidate ( const GoogleString key,
CacheInterface::KeyState  state 

Note that we have to forward validity faithfully here, as if we're wrapping a 2-level cache it will need to know accurately if the value is valid or not.

Reimplemented from net_instaweb::CacheInterface::Callback.

The documentation for this class was generated from the following file: