1 #ifndef CACHE_POLICY_HPP 2 #define CACHE_POLICY_HPP 4 #include <unordered_set> 9 template <
typename Key>
18 virtual void Insert(
const Key& key) = 0;
21 virtual void Touch(
const Key& key) = 0;
24 virtual void Erase(
const Key& key) = 0;
30 virtual void Clear() = 0;
34 template <
typename Key>
48 void Touch(
const Key& key)
override 53 void Erase(
const Key& key)
override 77 #endif // CACHE_POLICY_HPP virtual void Insert(const Key &key)=0
std::unordered_set< Key > key_storage
Definition: cache_policy.hpp:72
Definition: cache_policy.hpp:11
virtual ~ICachePolicy()
Definition: cache_policy.hpp:15
void Insert(const Key &key) override
Definition: cache_policy.hpp:43
virtual void Touch(const Key &key)=0
void Clear() override
Definition: cache_policy.hpp:65
~NoCachePolicy() override=default
Definition: cache_policy.hpp:35
virtual const Key & ReplCandidate() const =0
const Key & ReplCandidate() const override
Definition: cache_policy.hpp:59
virtual void Erase(const Key &key)=0
void Touch(const Key &key) override
Definition: cache_policy.hpp:48
void Erase(const Key &key) override
Definition: cache_policy.hpp:53