#include <util.hpp>
|
| ExpirationBlockNumberCache (uint32_t max_size, uint32_t delete_step, uint32_t blocks_to_keep) |
|
bool | insert (Key const &key, uint64_t block_number) |
| 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...
|
|
void | clear () |
|
| 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 () |
|
◆ ExpirationBlockNumberCache()
◆ clear()
◆ 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
◆ block_expiration_
◆ kBlocksToKeep
◆ last_block_number_
The documentation for this class was generated from the following file:
- libraries/common/include/common/util.hpp