25 #ifndef _bes_dap_response_cache_h 26 #define _bes_dap_response_cache_h 29 #include "BESFileLockingCache.h" 35 class ConstraintEvaluator;
36 class BaseTypeFactory;
48 static void delete_instance()
59 bool is_valid(
const std::string &cache_file_name,
const std::string &dataset);
60 void read_data_from_cache(
const string &cache_file_name, libdap::DDS *fdds);
61 libdap::DDS *get_cached_data_ddx(
const std::string &cache_file_name, libdap::BaseTypeFactory *factory,
62 const std::string &dataset);
64 friend class ResponseCacheTest;
65 friend class StoredResultTest;
88 static const string PATH_KEY;
89 static const string PREFIX_KEY;
90 static const string SIZE_KEY;
92 static BESDapResponseCache *get_instance(
const string &cache_dir,
const string &prefix,
unsigned long long size);
100 virtual libdap::DDS *cache_dataset(libdap::DDS &dds,
const std::string &constraint,
BESDapResponseBuilder *rb,
101 libdap::ConstraintEvaluator *eval, std::string &cache_token);
103 static string getCacheDirFromConfig();
104 static string getCachePrefixFromConfig();
105 static unsigned long getCacheSizeFromConfig();
108 #endif // _bes_dap_response_cache_h
Implementation of a caching mechanism for compressed data. This cache uses simple advisory locking fo...
BESDapResponseCache(const string &cache_dir, const string &prefix, unsigned long long size)
Protected constructor that takes as arguments keys to the cache directory, file prefix, and size of the cache to be looked up a configuration file.