|
teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
LRU Cache implementation. More...
#include <lrucache.hpp>
Public Member Functions | |
| LRUCache (size_t c) | |
| ctor More... | |
| bool | exists (const K &k) const |
| size_t | capacity () const |
| size_t | size () const |
| V & | get (const K &k) |
| Gets value at the given key and if the key does not exist it returns a default value object. More... | |
| void | put (const K &k, const V &v) |
LRU Cache implementation.
| K | key type |
| V | value type |
|
inline |
ctor
| c | capacity of the cache |
|
inline |
|
inline |
|
inline |
Gets value at the given key and if the key does not exist it returns a default value object.
|
inline |
puts a new element into the cache
|
inline |
1.8.17