diff options
author | vnugent <public@vaughnnugent.com> | 2023-11-02 01:50:06 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-11-02 01:50:06 -0400 |
commit | 9ddece0eac4dc3718c4f9279b4695d645a3e3cef (patch) | |
tree | 85f24fe1ee6f3845ef5bbb390530ea7e8042bbf2 /libs/VNLib.Plugins.Sessions.Cache.Client/src/IRemoteCacheStore.cs | |
parent | 43c9196b01799e334bde92e892f0bac47759901a (diff) |
also carried away
Diffstat (limited to 'libs/VNLib.Plugins.Sessions.Cache.Client/src/IRemoteCacheStore.cs')
-rw-r--r-- | libs/VNLib.Plugins.Sessions.Cache.Client/src/IRemoteCacheStore.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libs/VNLib.Plugins.Sessions.Cache.Client/src/IRemoteCacheStore.cs b/libs/VNLib.Plugins.Sessions.Cache.Client/src/IRemoteCacheStore.cs index aa2e3a7..b876c6c 100644 --- a/libs/VNLib.Plugins.Sessions.Cache.Client/src/IRemoteCacheStore.cs +++ b/libs/VNLib.Plugins.Sessions.Cache.Client/src/IRemoteCacheStore.cs @@ -41,9 +41,24 @@ namespace VNLib.Plugins.Sessions.Cache.Client /// <returns>A task that resolves the found object or null otherwise</returns> Task<T?> GetObjectAsync<T>(string objectId, CancellationToken cancellationToken = default); + /// <summary> + /// Adds or updates an object in the cache provider by session id and optionally it's new id + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="objectId">The session id to add or update</param> + /// <param name="newId">The uniqe id of the item to update</param> + /// <param name="obj"></param> + /// <param name="cancellationToken"></param> + /// <returns></returns> Task AddOrUpdateObjectAsync<T>(string objectId, string? newId, T obj, CancellationToken cancellationToken = default); - Task DeleteObjectAsync(string objectId, CancellationToken cancellationToken = default); + /// <summary> + /// Deletes an object from the cache provider by session id + /// </summary> + /// <param name="objectId">The id of the item to delete</param> + /// <param name="cancellationToken">A token to cancel the operation</param> + /// <returns>A value that indicates if the item was found and deleted</returns> + Task<bool> DeleteObjectAsync(string objectId, CancellationToken cancellationToken = default); /// <summary> /// Gets a value that determines if the remote cache store is available |