29template <
typename KeyType,
typename ValueType>
51 bool get(
const KeyType &key, ValueType &value) {
return false; }
63 void put(
const KeyType &key,
const ValueType &value) {}
71 bool contains(
const KeyType &key)
const {
return false; }
91template <
typename Key,
typename Value>
A thread-safe implementation of an LRU (Least Recently Used) cache.
Definition: ob_lru_cache.h:31
void put(const KeyType &key, const ValueType &value)
Inserts a key-value pair into the cache.
Definition: ob_lru_cache.h:63
bool contains(const KeyType &key) const
Checks whether the specified key exists in the cache.
Definition: ob_lru_cache.h:71
bool get(const KeyType &key, ValueType &value)
Retrieves a value from the cache using the specified key.
Definition: ob_lru_cache.h:51
ObLRUCache(size_t capacity)
Constructs an ObLRUCache with a specified capacity.
Definition: ob_lru_cache.h:38
size_t capacity_
The maximum number of elements the cache can hold.
Definition: ob_lru_cache.h:77