From 9ddece0eac4dc3718c4f9279b4695d645a3e3cef Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 2 Nov 2023 01:50:06 -0400 Subject: also carried away --- .../src/GlobalCacheStore.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs') diff --git a/libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs b/libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs index 89b2b5b..1770f0a 100644 --- a/libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs +++ b/libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs @@ -27,6 +27,7 @@ using System.Threading; using System.Threading.Tasks; using VNLib.Data.Caching; +using VNLib.Utils.Logging; namespace VNLib.Plugins.Sessions.Cache.Client { @@ -40,18 +41,19 @@ namespace VNLib.Plugins.Sessions.Cache.Client private readonly IGlobalCacheProvider _cache; private readonly SessionDataSerialzer _serialzer; - + /// /// Initiailzes a new with the backing /// global cache /// /// The backing cache store /// The size of the buffer used to serialize session objects + /// An optional log provider for writing serializing events to /// - public GlobalCacheStore(IGlobalCacheProvider globalCache, int bufferSize) + public GlobalCacheStore(IGlobalCacheProvider globalCache, int bufferSize, ILogProvider? debugLog) { _cache = globalCache ?? throw new ArgumentNullException(nameof(globalCache)); - _serialzer = new(bufferSize); + _serialzer = new(bufferSize, debugLog); } /// @@ -64,7 +66,7 @@ namespace VNLib.Plugins.Sessions.Cache.Client } /// - public Task DeleteObjectAsync(string objectId, CancellationToken cancellationToken = default) + public Task DeleteObjectAsync(string objectId, CancellationToken cancellationToken = default) { return _cache.DeleteAsync(objectId, cancellationToken); } -- cgit