aboutsummaryrefslogtreecommitdiff
path: root/plugins/ObjectCacheServer/src/ObjectCacheSystemState.cs
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ObjectCacheServer/src/ObjectCacheSystemState.cs')
-rw-r--r--plugins/ObjectCacheServer/src/ObjectCacheSystemState.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/plugins/ObjectCacheServer/src/ObjectCacheSystemState.cs b/plugins/ObjectCacheServer/src/ObjectCacheSystemState.cs
index cd5bf1b..3b3e2c0 100644
--- a/plugins/ObjectCacheServer/src/ObjectCacheSystemState.cs
+++ b/plugins/ObjectCacheServer/src/ObjectCacheSystemState.cs
@@ -187,15 +187,27 @@ namespace VNLib.Data.Caching.ObjectCache.Server
CacheListenerPubQueue queue = new(plugin, PeerEventQueue);
- //Must register background worker to listen for changes
+ //Must register the queue background worker to listen for changes
_ = plugin.ObserveWork(queue, 150);
+ BlobCacheListenerConfig conf = new()
+ {
+ Log = plugin.Log.CreateScope(CacheConstants.LogScopes.BlobCacheListener),
+ MemoryManager = new SharedHeapFBMMemoryManager(SharedCacheHeap),
+ EnableMessageChecksums = MemoryConfiguration.EnableChecksums,
+ LogTransactions = plugin.IsDebug() || plugin.HostArgs.HasArgument("--log-cache-events")
+ };
+
+ if (conf.LogTransactions)
+ {
+ plugin.Log.Information("Verbose cache event logging enabled");
+ }
+
//Endpoint only allows for a single reader
Listener = new(
plugin.LoadMemoryCacheSystem(config, manager, MemoryConfiguration),
- queue,
- plugin.Log.CreateScope(CacheConstants.LogScopes.BlobCacheListener),
- new SharedHeapFBMMemoryManager(SharedCacheHeap)
+ conf,
+ queue
);
InternalStore = new CacheStore(Listener.Cache);