KiCad PCB EDA Suite
|
#include <database_cache.h>
Public Types | |
typedef std::pair< std::string, std::pair< time_t, CacheValueType > > | CACHE_ENTRY |
typedef std::unordered_map< std::string, typename std::list< CACHE_ENTRY >::iterator > | CACHE_TYPE |
typedef CACHE_TYPE::const_iterator | CACHE_CITER |
typedef CacheValueType | CACHE_VALUE |
Public Member Functions | |
DATABASE_CACHE (size_t aMaxSize, time_t aMaxAge) | |
void | Put (const std::string &aQuery, const CacheValueType &aResult) |
bool | Get (const std::string &aQuery, CacheValueType &aResult) |
void | SetMaxSize (size_t aMaxSize) |
void | SetMaxAge (time_t aMaxAge) |
Private Attributes | |
size_t | m_maxSize |
time_t | m_maxAge |
std::list< CACHE_ENTRY > | m_cacheMru |
CACHE_TYPE | m_cache |
Definition at line 33 of file database_cache.h.
typedef CACHE_TYPE::const_iterator DATABASE_CACHE< CacheValueType >::CACHE_CITER |
Definition at line 40 of file database_cache.h.
typedef std::pair<std::string, std::pair<time_t, CacheValueType> > DATABASE_CACHE< CacheValueType >::CACHE_ENTRY |
Definition at line 36 of file database_cache.h.
typedef std::unordered_map<std::string, typename std::list<CACHE_ENTRY>::iterator> DATABASE_CACHE< CacheValueType >::CACHE_TYPE |
Definition at line 38 of file database_cache.h.
typedef CacheValueType DATABASE_CACHE< CacheValueType >::CACHE_VALUE |
Definition at line 42 of file database_cache.h.
|
inline |
Definition at line 44 of file database_cache.h.
|
inline |
Definition at line 75 of file database_cache.h.
References DATABASE_CACHE< CacheValueType >::m_cache, DATABASE_CACHE< CacheValueType >::m_cacheMru, and DATABASE_CACHE< CacheValueType >::m_maxAge.
|
inline |
Definition at line 49 of file database_cache.h.
References DATABASE_CACHE< CacheValueType >::m_cache, DATABASE_CACHE< CacheValueType >::m_cacheMru, and DATABASE_CACHE< CacheValueType >::m_maxSize.
|
inline |
Definition at line 98 of file database_cache.h.
References DATABASE_CACHE< CacheValueType >::m_maxAge.
|
inline |
Definition at line 97 of file database_cache.h.
References DATABASE_CACHE< CacheValueType >::m_maxSize.
|
private |
Definition at line 104 of file database_cache.h.
Referenced by DATABASE_CACHE< CacheValueType >::Get(), and DATABASE_CACHE< CacheValueType >::Put().
|
private |
Definition at line 103 of file database_cache.h.
Referenced by DATABASE_CACHE< CacheValueType >::Get(), and DATABASE_CACHE< CacheValueType >::Put().
|
private |
Definition at line 102 of file database_cache.h.
Referenced by DATABASE_CACHE< CacheValueType >::Get(), and DATABASE_CACHE< CacheValueType >::SetMaxAge().
|
private |
Definition at line 101 of file database_cache.h.
Referenced by DATABASE_CACHE< CacheValueType >::Put(), and DATABASE_CACHE< CacheValueType >::SetMaxSize().