72class BESDapFunctionResponseCache:
public BESFileLockingCache {
74 static bool d_enabled;
75 static BESDapFunctionResponseCache *d_instance;
80 static void delete_instance() {
89 BESDapFunctionResponseCache();
90 BESDapFunctionResponseCache(
const BESDapFunctionResponseCache &src);
93 bool is_valid(
const std::string &cache_file_name,
const std::string &dataset);
95 std::string get_resource_id(libdap::DDS *dds,
const std::string &constraint);
96 std::string get_hash_basename(
const std::string &resource_id);
98 libdap::DDS *read_cached_data(std::istream &cached_data);
100 libdap::DDS *write_dataset_to_cache(libdap::DDS *dds,
const std::string &resourceId,
const std::string &constraint,
101 const std::string &cache_file_name);
103 libdap::DDS *load_from_cache(
const std::string &resource_id, std::string &cache_file_name);
105 friend class FunctionResponseCacheTest;
106 friend class StoredResultTest;
124 BESFileLockingCache(cache_dir, prefix, size)
129 static const std::string PATH_KEY;
130 static const std::string PREFIX_KEY;
131 static const std::string SIZE_KEY;
134 unsigned long long size);
145 virtual bool can_be_cached(libdap::DDS *dds,
const std::string &constraint);
147 static string get_cache_dir_from_config();
148 static string get_cache_prefix_from_config();
149 static unsigned long get_cache_size_from_config();
BESDapFunctionResponseCache(const std::string &cache_dir, const std::string &prefix, unsigned long long size)
Protected constructor that takes as arguments keys to the cache directory, file prefix,...