aboutsummaryrefslogtreecommitdiff
path: root/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs')
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
index 382717b..8e25416 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
@@ -84,7 +84,7 @@ namespace VNLib.Plugins.Essentials.Sessions.VNCache
IReadOnlyDictionary<string, JsonElement> webSessionConfig)
{
//Init cache client
- using VnCacheClient cache = new(plugin.IsDebug() ? plugin.Log : null, Memory.Shared);
+ using VnCacheClient cache = new(plugin.IsDebug() ? localized : null, Memory.Shared);
try
{
@@ -97,9 +97,11 @@ namespace VNLib.Plugins.Essentials.Sessions.VNCache
//Init provider
_sessions = new(cache.Resource!, cacheLimit, maxConnections, idFactory);
-
localized.Information("Session provider loaded");
+ //Listen for cache table events
+ _ = plugin.DeferTask(() => _sessions.CleanupExpiredSessionsAsync(localized, plugin.UnloadToken));
+
//Run and wait for exit
await cache.RunAsync(localized, plugin.UnloadToken);