diff options
Diffstat (limited to 'src/zenserver/cache/structuredcachestore.cpp')
| -rw-r--r-- | src/zenserver/cache/structuredcachestore.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/zenserver/cache/structuredcachestore.cpp b/src/zenserver/cache/structuredcachestore.cpp index c8384d330..4499b05f7 100644 --- a/src/zenserver/cache/structuredcachestore.cpp +++ b/src/zenserver/cache/structuredcachestore.cpp @@ -120,6 +120,13 @@ ZenCacheNamespace::DropBucket(std::string_view Bucket) return AnyDropped; } +void +ZenCacheNamespace::EnumerateBucketContents(std::string_view Bucket, + std::function<void(const IoHash& Key, const CacheValueDetails::ValueDetails& Details)>& Fn) const +{ + m_DiskLayer.EnumerateBucketContents(Bucket, Fn); +} + bool ZenCacheNamespace::Drop() { @@ -502,6 +509,17 @@ ZenCacheStore::GetValueDetails(const std::string_view NamespaceFilter, return Details; } +void +ZenCacheStore::EnumerateBucketContents(std::string_view Namespace, + std::string_view Bucket, + std::function<void(const IoHash& Key, const CacheValueDetails::ValueDetails& Details)>&& Fn) +{ + if (const ZenCacheNamespace* Ns = FindNamespace(Namespace)) + { + Ns->EnumerateBucketContents(Bucket, Fn); + } +} + ZenCacheNamespace* ZenCacheStore::GetNamespace(std::string_view Namespace) { |