aboutsummaryrefslogtreecommitdiff
path: root/libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-11-02 01:50:06 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-11-02 01:50:06 -0400
commit9ddece0eac4dc3718c4f9279b4695d645a3e3cef (patch)
tree85f24fe1ee6f3845ef5bbb390530ea7e8042bbf2 /libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs
parent43c9196b01799e334bde92e892f0bac47759901a (diff)
also carried away
Diffstat (limited to 'libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs')
-rw-r--r--libs/VNLib.Plugins.Sessions.Cache.Client/src/GlobalCacheStore.cs10
1 files changed, 6 insertions, 4 deletions
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;
-
+
/// <summary>
/// Initiailzes a new <see cref="GlobalCacheStore"/> with the backing <see cref="IGlobalCacheProvider"/>
/// global cache
/// </summary>
/// <param name="globalCache">The backing cache store</param>
/// <param name="bufferSize">The size of the buffer used to serialize session objects</param>
+ /// <param name="debugLog">An optional log provider for writing serializing events to</param>
/// <exception cref="ArgumentNullException"></exception>
- 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);
}
///<inheritdoc/>
@@ -64,7 +66,7 @@ namespace VNLib.Plugins.Sessions.Cache.Client
}
///<inheritdoc/>
- public Task DeleteObjectAsync(string objectId, CancellationToken cancellationToken = default)
+ public Task<bool> DeleteObjectAsync(string objectId, CancellationToken cancellationToken = default)
{
return _cache.DeleteAsync(objectId, cancellationToken);
}