Page Speed Optimization Libraries
1.4.26.1
|
#include "abstract_client_state.h"
Public Member Functions | |
virtual bool | InCache (const GoogleString &url)=0 |
virtual void | Set (const GoogleString &url, int64 expire_ms)=0 |
virtual void | Clear ()=0 |
Clears cached knowledge for this client. | |
virtual const GoogleString & | ClientId () const =0 |
Returns the client ID associated with this ClientState object. | |
virtual bool | InitFromPropertyCache (const GoogleString &client_id, PropertyCache *property_cache, PropertyPage *property_page, Timer *timer)=0 |
virtual void | WriteBackToPropertyCache ()=0 |
Represent state tracked on a per-client basis. For now, this interface estimates whether a given object is resident in the client's cache.
virtual bool net_instaweb::AbstractClientState::InCache | ( | const GoogleString & | url | ) | [pure virtual] |
Returns an estimate of whether the client is caching this URL. Note that this is a best-effort guess and may not be accurate with respect to the true client cache state.
Implemented in net_instaweb::ClientState.
virtual bool net_instaweb::AbstractClientState::InitFromPropertyCache | ( | const GoogleString & | client_id, |
PropertyCache * | property_cache, | ||
PropertyPage * | property_page, | ||
Timer * | timer | ||
) | [pure virtual] |
Initialize a ClientState from a property cache read. If the PropertyPage does not contain a ClientState object (e.g., due to a cache lookup failure), this method returns false. Otherwise, returns true. The ClientState takes ownership of the property_page in both cases.
Implemented in net_instaweb::ClientState.
virtual void net_instaweb::AbstractClientState::Set | ( | const GoogleString & | url, |
int64 | expire_ms | ||
) | [pure virtual] |
Used to indicate that the given client is storing this URL for up to expire_ms.
Implemented in net_instaweb::ClientState.
virtual void net_instaweb::AbstractClientState::WriteBackToPropertyCache | ( | ) | [pure virtual] |
Write this ClientState back to the property cache. It is an error to call this method without first having called InitFromPropertyCache() and having 'true' returned from that method.
Implemented in net_instaweb::ClientState.