26 #ifndef _bes_dap_function_response_cache_h
27 #define _bes_dap_function_response_cache_h
31 #include "BESFileLockingCache.h"
37 class ConstraintEvaluator;
74 static bool d_enabled;
80 static void delete_instance() {
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(istream &cached_data);
100 libdap::DDS *write_dataset_to_cache(libdap::DDS *dds,
const string &resourceId,
const string &constraint,
101 const string &cache_file_name);
103 libdap::DDS *load_from_cache(
const string &resource_id,
string &cache_file_name);
105 friend class FunctionResponseCacheTest;
106 friend class StoredResultTest;
129 static const string PATH_KEY;
130 static const string PREFIX_KEY;
131 static const string SIZE_KEY;
144 virtual bool can_be_cached(libdap::DDS *dds,
const std::string &constraint);
146 static string get_cache_dir_from_config();
147 static string get_cache_prefix_from_config();
148 static unsigned long get_cache_size_from_config();
151 #endif // _bes_dap_response_cache_h