53 void clear()
override;
64 virtual bool addToCache(std::shared_ptr<json::Object> data, std::string
id);
96 virtual std::shared_ptr<const json::Object>
getFromCache(std::string
id);
109 bool restart =
false);
128 std::map<std::string, std::shared_ptr<json::Object>> m_Cache;
134 std::map<std::string, std::shared_ptr<json::Object>>::iterator m_CacheDumpItr;
140 std::mutex & getMutex();
virtual std::shared_ptr< const json::Object > getFromCache(std::string id)
get data from Cache
Definition: cache.cpp:123
virtual bool removeFromCache(std::string id)
remove data from Cache
Definition: cache.cpp:75
virtual bool addToCache(std::shared_ptr< json::Object > data, std::string id)
add data to Cache
Definition: cache.cpp:41
The neic-glass3 project namespace containing all the classes and functions that make up neic-glass3...
glass3::util::BaseClass class - encapsulates the most basic setup and configuration logic...
Definition: baseclass.h:30
virtual ~Cache()
Cache destructor.
Definition: cache.cpp:22
void clear() override
Cache clear function.
Definition: cache.cpp:26
virtual std::shared_ptr< const json::Object > getNextFromCache(bool restart=false)
get next data from Cache
Definition: cache.cpp:145
virtual bool isInCache(std::string id)
check for data in Cache
Definition: cache.cpp:103
int size()
Retrieves the current size of the Cache.
Definition: cache.cpp:180
logger.h contains the interface to the neic-glass3 logging library
Cache()
Cache constructor.
Definition: cache.cpp:17
glass3::util::Cache class - a thread safe in-memory cache
Definition: cache.h:30
virtual bool isEmpty()
check if Cache empty
Definition: cache.cpp:172