diff options
| author | Stefan Boberg <[email protected]> | 2023-09-13 12:03:27 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-13 12:03:27 +0200 |
| commit | caf171abc24c20206eb8ecaff4b6e9137cb9e871 (patch) | |
| tree | 00ad62f2e829e6cb4608a4d70c6c4104b21315ce /src/zenserver/zenserver.cpp | |
| parent | incremental oplog upload for block-based targets (#392) (diff) | |
| download | zen-caf171abc24c20206eb8ecaff4b6e9137cb9e871.tar.xz zen-caf171abc24c20206eb8ecaff4b6e9137cb9e871.zip | |
ZenCacheStore is now reference counted (#398)
this change also adds a GetNamespaces function which may be used to enumerate all currently known cache namespaces
Diffstat (limited to 'src/zenserver/zenserver.cpp')
| -rw-r--r-- | src/zenserver/zenserver.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/zenserver/zenserver.cpp b/src/zenserver/zenserver.cpp index b8831476d..cfc4a228b 100644 --- a/src/zenserver/zenserver.cpp +++ b/src/zenserver/zenserver.cpp @@ -722,7 +722,7 @@ private: zen::GcManager m_GcManager; zen::GcScheduler m_GcScheduler{m_GcManager}; std::unique_ptr<zen::CidStore> m_CidStore; - std::unique_ptr<zen::ZenCacheStore> m_CacheStore; + Ref<zen::ZenCacheStore> m_CacheStore; zen::HttpTestService m_TestService; #if ZEN_WITH_TESTS zen::HttpTestingService m_TestingService; @@ -870,12 +870,11 @@ ZenServer::InitializeStructuredCache(const ZenServerOptions& ServerOptions) using namespace std::literals; ZEN_INFO("instantiating structured cache service"); - m_CacheStore = - std::make_unique<ZenCacheStore>(m_GcManager, - ZenCacheStore::Configuration{.BasePath = m_DataRoot / "cache", - .AllowAutomaticCreationOfNamespaces = true, - .EnableWriteLog = ServerOptions.StructuredCacheWriteLogEnabled, - .EnableAccessLog = ServerOptions.StructuredCacheAccessLogEnabled}); + m_CacheStore = new ZenCacheStore(m_GcManager, + ZenCacheStore::Configuration{.BasePath = m_DataRoot / "cache", + .AllowAutomaticCreationOfNamespaces = true, + .EnableWriteLog = ServerOptions.StructuredCacheWriteLogEnabled, + .EnableAccessLog = ServerOptions.StructuredCacheAccessLogEnabled}); const ZenUpstreamCacheConfig& UpstreamConfig = ServerOptions.UpstreamCacheConfig; |