44 #define MAX_LOCK_RETRY_MS 5000 // in microseconds 45 #define MAX_LOCK_TRIES 16 62 unsigned int _cache_size ;
65 void check_ctor_params();
72 const string &cache_dir_key,
73 const string &prefix_key,
74 const string &size_key ) ;
77 virtual bool lock(
unsigned int retry_ms,
78 unsigned int num_tries ) ;
81 virtual bool is_cached(
const string &src,
string &target ) ;
82 virtual void purge( ) ;
85 string prefix( ) {
return _prefix ; }
88 virtual void dump( ostream &strm )
const ;
virtual bool lock(unsigned int retry_ms, unsigned int num_tries)
lock the cache using a file lock
virtual void purge()
Check to see if the cache size exceeds the size specified in the constructor and purge older files un...
Implementation of a caching mechanism.
unsigned int cache_size()
virtual void dump(ostream &strm) const
dumps information about this object
Base object for bes objects.
mapping of key/value pairs defining different behaviors of an application.
virtual bool unlock()
unlock the cache
virtual bool is_cached(const string &src, string &target)
Determine if the file specified by src is cached.