libboxes
boxes is a set of specialised containers built on top of STL
|
Implements generic cache with pluggable eviction policies. More...
#include "compiler.hpp"
#include <list>
#include <map>
#include <memory>
#include <unordered_map>
Go to the source code of this file.
Classes | |
class | boxes::cache::policy::NoEviction< K, V > |
Eviction policy that never evicts elements. More... | |
class | boxes::cache::policy::MRU< K, V > |
Constructs a new MRU eviction policy. More... | |
class | boxes::cache::policy::LFU< K, V > |
Eviction policy that evicts the least frequently used element. More... | |
class | boxes::cache::Cache< K, V, CachePolicy > |
Generic cache with pluggable eviction policies. More... | |
Functions | |
template<typename K , typename V > | |
Cache< K, V, policy::LRU > | boxes::cache::makeLRU (std::size_t size) |
Create a new LRU cache. More... | |
template<typename K , typename V > | |
Cache< K, V, policy::MRU > | boxes::cache::makeMRU (std::size_t size) |
Create a new MRU cache. More... | |
template<typename K , typename V > | |
Cache< K, V, policy::NoEviction > | boxes::cache::makeNoEviction () |
Create a new no eviction cache. More... | |
template<typename K , typename V > | |
Cache< K, V, policy::LFU > | boxes::cache::makeLFU (std::size_t size) |
Create a new LFU cache. More... | |
Implements generic cache with pluggable eviction policies.
Copyright 2024 Tomasz Wisniewski twdev.nosp@m..blo.nosp@m.gger@.nosp@m.gmai.nosp@m.l.com
Definition in file cache.hpp.
Cache< K, V, policy::LFU > boxes::cache::makeLFU | ( | std::size_t | size | ) |
Cache< K, V, policy::LRU > boxes::cache::makeLRU | ( | std::size_t | size | ) |
Cache< K, V, policy::MRU > boxes::cache::makeMRU | ( | std::size_t | size | ) |