aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenstore/cache/structuredcachestore.cpp')
-rw-r--r--src/zenstore/cache/structuredcachestore.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/zenstore/cache/structuredcachestore.cpp b/src/zenstore/cache/structuredcachestore.cpp
index d30bd93cc..578929198 100644
--- a/src/zenstore/cache/structuredcachestore.cpp
+++ b/src/zenstore/cache/structuredcachestore.cpp
@@ -370,6 +370,12 @@ ZenCacheNamespace::DisableUpdateCapture()
m_DiskLayer.DisableUpdateCapture();
}
+bool
+ZenCacheNamespace::GetContentStats(std::string_view BucketName, CacheContentStats& OutContentStats) const
+{
+ return m_DiskLayer.GetContentStats(BucketName, OutContentStats);
+}
+
#if ZEN_WITH_TESTS
void
ZenCacheNamespace::SetAccessTime(std::string_view Bucket, const IoHash& HashKey, GcClock::TimePoint Time)
@@ -1080,6 +1086,16 @@ ZenCacheStore::GetCapturedNamespaces()
return {};
}
+bool
+ZenCacheStore::GetContentStats(std::string_view NamespaceName, std::string_view BucketName, CacheContentStats& OutContentStats) const
+{
+ if (const ZenCacheNamespace* Namespace = FindNamespace(NamespaceName); Namespace)
+ {
+ return Namespace->GetContentStats(BucketName, OutContentStats);
+ }
+ return false;
+}
+
std::string
ZenCacheStore::GetGcName(GcCtx&)
{
@@ -1161,7 +1177,13 @@ public:
for (ZenCacheDiskLayer::CacheBucket* Bucket : AddedBuckets)
{
- bool Continue = Bucket->GetReferences(Ctx, /*StateIsAlreadyLocked*/ true, m_References);
+ bool Continue = Bucket->GetReferences(Ctx.Logger,
+ Ctx.IsCancelledFlag,
+ /*StateIsAlreadyLocked*/ true,
+ Ctx.Settings.StoreCacheAttachmentMetaData,
+ Ctx.Settings.StoreCacheAttachmentMetaData,
+ m_References,
+ nullptr);
if (!Continue)
{
break;