aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/zenserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenserver/zenserver.cpp')
-rw-r--r--src/zenserver/zenserver.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/zenserver/zenserver.cpp b/src/zenserver/zenserver.cpp
index e4143dc01..cf9f03d89 100644
--- a/src/zenserver/zenserver.cpp
+++ b/src/zenserver/zenserver.cpp
@@ -383,7 +383,7 @@ public:
}
#endif // ZEN_WITH_COMPUTE_SERVICES
- if (ServerOptions.StructuredCacheEnabled)
+ if (ServerOptions.StructuredCacheConfig.Enabled)
{
InitializeStructuredCache(ServerOptions);
}
@@ -946,13 +946,17 @@ ZenServer::InitializeStructuredCache(const ZenServerOptions& ServerOptions)
using namespace std::literals;
ZEN_INFO("instantiating structured cache service");
- m_CacheStore =
- new ZenCacheStore(m_GcManager,
- ZenCacheStore::Configuration{.BasePath = m_DataRoot / "cache",
- .AllowAutomaticCreationOfNamespaces = true,
- .Logging = {.EnableWriteLog = ServerOptions.StructuredCacheWriteLogEnabled,
- .EnableAccessLog = ServerOptions.StructuredCacheAccessLogEnabled}},
- m_GcManager.GetDiskWriteBlocker());
+ m_CacheStore = new ZenCacheStore(
+ m_GcManager,
+ *m_JobQueue,
+ ZenCacheStore::Configuration{.BasePath = m_DataRoot / "cache",
+ .AllowAutomaticCreationOfNamespaces = true,
+ .MemLayerConfig = {.TargetFootprintBytes = ServerOptions.StructuredCacheConfig.MemTargetFootprintBytes,
+ .TrimIntervalSeconds = ServerOptions.StructuredCacheConfig.MemTrimIntervalSeconds,
+ .MaxAgeSeconds = ServerOptions.StructuredCacheConfig.MemMaxAgeSeconds},
+ .Logging = {.EnableWriteLog = ServerOptions.StructuredCacheConfig.WriteLogEnabled,
+ .EnableAccessLog = ServerOptions.StructuredCacheConfig.AccessLogEnabled}},
+ m_GcManager.GetDiskWriteBlocker());
const ZenUpstreamCacheConfig& UpstreamConfig = ServerOptions.UpstreamCacheConfig;