#include "single_pointer_cache.hpp"

Public Types | |
| using | DataPointer = std::shared_ptr< std::decay_t< DataType > > |
Public Member Functions | |
| void | insert (DataPointer data) |
| DataPointer | get () const |
| void | release () |
Thread-safely stores and returns shared pointer to an element of template type
| using iroha::cache::SinglePointerCache< DataType >::DataPointer = std::shared_ptr<std::decay_t<DataType> > |
Pointer to data type
| SinglePointerCache< DataType >::DataPointer iroha::cache::SinglePointerCache< DataType >::get | ( | ) | const |
Get data from the cache
| void iroha::cache::SinglePointerCache< DataType >::insert | ( | SinglePointerCache< DataType >::DataPointer | data | ) |
Insert data to the cache
| pointer | to the data to be inserted |
| void iroha::cache::SinglePointerCache< DataType >::release | ( | ) |
Delete data inside the cache