aboutsummaryrefslogtreecommitdiff
path: root/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-08-05 17:50:16 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-08-05 17:50:16 -0400
commitbd4590d7cfaf2fa554ff6c37e095975ac4eb0f02 (patch)
tree66c4720e46cb7eb066a784a22a4de3544babbafb /lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs
parent6de8bb6b38b716605f0d275d998ca47e33520b7a (diff)
Public prep, and api additions
Diffstat (limited to 'lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs')
-rw-r--r--lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs b/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs
index b10cef7..72eecd8 100644
--- a/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs
+++ b/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs
@@ -273,7 +273,22 @@ namespace VNLib.Plugins.Extensions.VNCache
? throw new InvalidOperationException("The underlying client is not connected to a cache node")
: Client!.AddOrUpdateObjectAsync(key, newKey, value, serialzer, cancellation);
}
-
+
+ ///<inheritdoc/>
+ public virtual Task GetAsync(string key, IObjectData rawData, CancellationToken cancellation)
+ {
+ return !IsConnected
+ ? throw new InvalidOperationException("The underlying client is not connected to a cache node")
+ : Client!.GetObjectAsync(key, rawData, cancellation);
+ }
+
+ ///<inheritdoc/>
+ public virtual Task AddOrUpdateAsync(string key, string? newKey, IObjectData rawData, ICacheObjectSerialzer serialzer, CancellationToken cancellation)
+ {
+ return !IsConnected
+ ? throw new InvalidOperationException("The underlying client is not connected to a cache node")
+ : Client!.AddOrUpdateObjectAsync(key, newKey, rawData, serialzer, cancellation);
+ }
private sealed class AuthManager : ICacheAuthManager
{