diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/leveldb/cache.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/leveldb/cache.h b/include/leveldb/cache.h index 1a201e5..5f86cd0 100644 --- a/include/leveldb/cache.h +++ b/include/leveldb/cache.h @@ -81,6 +81,13 @@ class Cache { // its cache keys. virtual uint64_t NewId() = 0; + // Remove all cache entries that are not actively in use. Memory-constrained + // applications may wish to call this method to reduce memory usage. + // Default implementation of Prune() does nothing. Subclasses are strongly + // encouraged to override the default implementation. A future release of + // leveldb may change Prune() to a pure abstract method. + virtual void Prune() {} + private: void LRU_Remove(Handle* e); void LRU_Append(Handle* e); |