caches::NoCachePolicy
Basic no caching policy class. More...
#include <cache_policy.hpp>
Inherits from caches::ICachePolicy< Key >
Public Functions
Name | |
---|---|
NoCachePolicy() =default | |
~NoCachePolicy() override =default | |
virtual void | Insert(const Key & key) override Handle element insertion in a cache. |
virtual void | Touch(const Key & key) override Handle request to the key-element in a cache. |
virtual void | Erase(const Key & key) override Handle element deletion from a cache. |
virtual const Key & | ReplCandidate() const override Return a key of a replacement candidate. |
Additional inherited members
Public Functions inherited from caches::ICachePolicy< Key >
Name | |
---|---|
virtual | ~ICachePolicy() =default |
Detailed Description
template <typename Key >
class caches::NoCachePolicy;
Basic no caching policy class.
Template Parameters:
- Key Type of a key a policy works with
Preserve any key provided. Erase procedure can get rid of any added keys without specific rules: a replacement candidate will be the first element in the underlying container. As unordered container can be used in the implementation there are no warranties that the first/last added key will be erased
Public Functions Documentation
function NoCachePolicy
NoCachePolicy() =default
function ~NoCachePolicy
~NoCachePolicy() override =default
function Insert
inline virtual void Insert(
const Key & key
) override
Handle element insertion in a cache.
Parameters:
- key Key that should be used by the policy
Reimplements: caches::ICachePolicy::Insert
function Touch
inline virtual void Touch(
const Key & key
) override
Handle request to the key-element in a cache.
Parameters:
- key
Reimplements: caches::ICachePolicy::Touch
function Erase
inline virtual void Erase(
const Key & key
) override
Handle element deletion from a cache.
Parameters:
- key Key that should be used by the policy
Reimplements: caches::ICachePolicy::Erase
function ReplCandidate
inline virtual const Key & ReplCandidate() const override
Return a key of a replacement candidate.
Return: Replacement candidate according to selected policy
Reimplements: caches::ICachePolicy::ReplCandidate