#include <util.hpp>
|
| ExpirationCache (uint32_t max_size, uint32_t delete_step) |
|
bool | insert (Key const &key) |
| Inserts key into the cache map. In case provided key is already in cache, only shared lock is acquired and function returns false. This means insert does not need to be used together with count() to save the performance by not acquiring unique lock. More...
|
|
bool | contains (Key const &key) const |
|
void | erase (Key const &key) |
|
std::size_t | count (Key const &key) const |
|
std::size_t | size () const |
|
void | clear () |
|
◆ ExpirationCache()
◆ clear()
◆ contains()
◆ count()
◆ erase()
◆ insert()
Inserts key into the cache map. In case provided key is already in cache, only shared lock is acquired and function returns false. This means insert does not need to be used together with count() to save the performance by not acquiring unique lock.
- Parameters
-
- Returns
- true if actual insertion took place, otherwise false
◆ size()
◆ cache_
◆ expiration_
◆ kDeleteStep
◆ kMaxSize
◆ mtx_
The documentation for this class was generated from the following file:
- libraries/common/include/common/util.hpp