diff options
author | vnugent <public@vaughnnugent.com> | 2023-08-05 17:50:16 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-08-05 17:50:16 -0400 |
commit | bd4590d7cfaf2fa554ff6c37e095975ac4eb0f02 (patch) | |
tree | 66c4720e46cb7eb066a784a22a4de3544babbafb /lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClient.cs | |
parent | 6de8bb6b38b716605f0d275d998ca47e33520b7a (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.cs | 17 |
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 { |