aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-20 11:02:26 +0200
committerGitHub <[email protected]>2023-10-20 11:02:26 +0200
commit57f054be2f4f68d0d52631838655a45855c33655 (patch)
tree4a768d8eee548c1c4c002388e48da3d62850dc02 /src/zenserver/cache/structuredcachestore.cpp
parentAdd --skip-delete option to gc command (#484) (diff)
downloadzen-57f054be2f4f68d0d52631838655a45855c33655.tar.xz
zen-57f054be2f4f68d0d52631838655a45855c33655.zip
clean up GcContributor and GcStorage to be pure interfaces (#485)
Diffstat (limited to 'src/zenserver/cache/structuredcachestore.cpp')
-rw-r--r--src/zenserver/cache/structuredcachestore.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zenserver/cache/structuredcachestore.cpp b/src/zenserver/cache/structuredcachestore.cpp
index 05b4c2e58..786053adc 100644
--- a/src/zenserver/cache/structuredcachestore.cpp
+++ b/src/zenserver/cache/structuredcachestore.cpp
@@ -63,8 +63,7 @@ ZenCacheNamespace::ZenCacheNamespace(GcManager& Gc,
const std::filesystem::path& RootDir,
bool EnableReferenceCaching,
const ZenCacheMemoryLayer::Configuration MemLayerConfig)
-: GcStorage(Gc)
-, GcContributor(Gc)
+: m_Gc(Gc)
, m_RootDir(RootDir)
, m_JobQueue(JobQueue)
, m_MemLayer(m_JobQueue, MemLayerConfig)
@@ -74,10 +73,15 @@ ZenCacheNamespace::ZenCacheNamespace(GcManager& Gc,
CreateDirectories(RootDir);
m_DiskLayer.DiscoverBuckets();
+
+ m_Gc.AddGcContributor(this);
+ m_Gc.AddGcStorage(this);
}
ZenCacheNamespace::~ZenCacheNamespace()
{
+ m_Gc.RemoveGcStorage(this);
+ m_Gc.RemoveGcContributor(this);
}
bool