11 #ifndef __UT_LocalDiskCache__
12 #define __UT_LocalDiskCache__
28 unsigned getHash()
const override = 0;
35 virtual int64 getTotalMemory()
const;
58 int64 max_item_count);
63 void clearCache(
bool reset_file=
true);
75 bool remove_from_cache =
true);
79 const void *buffer,
int64 buffer_size);
85 int64 getMemoryUsed()
const;
93 myCache.threadSafeTraversal(task);
106 UT_ConcurrentQueue<int64> myQueue;
109 int64 myMaxItemSize, myMaxItemCount;
int64 getFileSize() const
Get the file size.
void traverseCache(T &task)
Traverse the cache.
Base class for search keys for UT_CappedCache.
virtual bool isEqual(const UT_CappedKey &key) const =0
Test equality.
GT_API const UT_StringHolder cache_name
virtual unsigned int getHash() const =0
Return a hash for the key.
Class used to lookup cache items.
virtual UT_CappedKey * duplicate() const =0
The duplicate() method should return a copy of the key.
const UT_CappedCache & getCache() const
Const access to the cache.
A disk cache to store expensive data on a local disk.