Public Member Functions | |
CachePolicy () | |
virtual | ~CachePolicy () |
void | cacheUpdated () |
bool | isExpired () |
Protected Member Functions | |
virtual void | _markAsUpdated () |
virtual bool | _checkIfExpired () |
The base class for cache expiration policies. For convenience, this class provides an implementation of a "never expire" policy, so instances of this class can be used in cases in which no automatic expiration is desired.
Definition at line 16 of file CachePolicy.h.
|
inlineexplicit |
Definition at line 20 of file CachePolicy.h.
|
inlinevirtual |
Definition at line 22 of file CachePolicy.h.
References _checkIfExpired(), _markAsUpdated(), cacheUpdated(), and isExpired().
|
protectedvirtual |
Tests if the associated cache has expired based on the criteria in the policy.
Reimplemented in novadaq::TimedCachePolicy.
Definition at line 38 of file CachePolicy.cpp.
Referenced by isExpired(), and ~CachePolicy().
|
protectedvirtual |
Tells the policy that a cache update was done. This is used to reset the state of the policy to "unexpired" after an update.
Reimplemented in novadaq::TimedCachePolicy.
Definition at line 27 of file CachePolicy.cpp.
Referenced by cacheUpdated(), and ~CachePolicy().
void novadaq::CachePolicy::cacheUpdated | ( | ) |
Tells the policy that a cache update was done. This is used to reset the state of the policy to "unexpired" after an update.
Definition at line 9 of file CachePolicy.cpp.
References _markAsUpdated().
Referenced by novadaq::Cache::_reloadIfNeeded(), and ~CachePolicy().
bool novadaq::CachePolicy::isExpired | ( | ) |
Tests if the associated cache has expired based on the criteria in the policy.
Definition at line 19 of file CachePolicy.cpp.
References _checkIfExpired().
Referenced by novadaq::Cache::_reloadIfNeeded(), and ~CachePolicy().