Simple thread-safe cache to store a mapping from code hash to code size.
More...
#include <CodeSizeCache.h>
Simple thread-safe cache to store a mapping from code hash to code size.
If the cache is full, a random element is removed.
Definition at line 36 of file CodeSizeCache.h.
bool dev::eth::CodeSizeCache::contains |
( |
h256 const & |
_hash | ) |
const |
|
inline |
size_t dev::eth::CodeSizeCache::get |
( |
h256 const & |
_hash | ) |
const |
|
inline |
void dev::eth::CodeSizeCache::removeRandomElement |
( |
| ) |
|
|
inlineprivate |
Removes a random element from the cache.
Definition at line 61 of file CodeSizeCache.h.
void dev::eth::CodeSizeCache::store |
( |
h256 const & |
_hash, |
|
|
size_t |
size |
|
) |
| |
|
inline |
const size_t dev::eth::CodeSizeCache::c_maxSize = 50000 |
|
staticprivate |
std::map<h256, size_t> dev::eth::CodeSizeCache::m_cache |
|
private |
Mutex dev::eth::CodeSizeCache::x_cache |
|
mutableprivate |
The documentation for this class was generated from the following file: