The LRU Cache class. More...
#include <cache.h>
Public Types | |
typedef std::pair< Tkey, Tvalue > | key_value_pair_t |
typedef std::list< key_value_pair_t >::iterator | list_iterator_t |
Public Member Functions | |
LRUCache (int const &size=1) | |
LRUCache constructor. More... | |
LRUCache (const LRUCache &obj) | |
void | setCacheSize (int const &size) |
Set the Cache size. | |
int const & | getCacheSize () const |
Get the Cache size. | |
void | store (Tkey const &key, Tvalue const &value) |
Store the cached data. | |
bool | get (Tkey const &key, Tvalue &out) |
Get the cached data. | |
The LRU Cache class.
Implements the LRU algorithm for caching.
ql::LRUCache< Tkey, Tvalue >::LRUCache | ( | int const & | size = 1 | ) |