5 #ifndef JODA_QUERYCACHE_H
6 #define JODA_QUERYCACHE_H
10 #include <unordered_map>
11 #include "../../../src/cache/CacheEntry.h"
24 std::shared_ptr<const CacheEntry::CacheIndex>
getBestCache(
25 const std::shared_ptr<joda::query::Predicate> &pred);
32 std::shared_ptr<const CacheEntry::CacheIndex>
getBestCache(
33 const std::unique_ptr<joda::query::Predicate> &pred);
39 std::shared_ptr<const CacheEntry::CacheIndex>
getBestCache(
40 const std::string &predStr);
46 bool cacheAvailable(
const std::shared_ptr<joda::query::Predicate> &pred);
63 void addQueryResult(std::shared_ptr<const CacheEntry::CacheIndex> docs,
64 const std::shared_ptr<joda::query::Predicate> &predicate);
72 std::unordered_map<std::string, std::unique_ptr<CacheEntry>>
queryMap;
Definition: QueryCache.h:17
std::unordered_map< std::string, std::unique_ptr< CacheEntry > > queryMap
Definition: QueryCache.h:72
void addQueryResult(std::unique_ptr< CacheEntry > &&ce)
Definition: QueryCache.cpp:9
void reset()
Definition: QueryCache.cpp:51
bool cacheAvailable(const std::shared_ptr< joda::query::Predicate > &pred)
Definition: QueryCache.cpp:53
std::shared_ptr< const CacheEntry::CacheIndex > getBestCache(const std::shared_ptr< joda::query::Predicate > &pred)
Definition: QueryCache.cpp:29