Interface IKeyedStore
Interface for a keyed persistence store that supports existence checks and deletions.
Namespace: Serenity.Persistence.Domain.Interfaces
Assembly: Serenity.Global.Domain.dll
Syntax
public interface IKeyedStore : IPersistenceStore
Methods
DeleteAsync(string, CancellationToken)
Deletes a key and its associated data from the store.
Declaration
Task DeleteAsync(string key, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key to delete. |
| CancellationToken | cancellationToken | A token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| Task | A task that represents the asynchronous delete operation. |
ExistsAsync(string, CancellationToken)
Checks if a key exists in the store.
Declaration
Task<bool> ExistsAsync(string key, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key to check for existence. |
| CancellationToken | cancellationToken | A token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| Task<bool> | A task that represents the asynchronous existence check operation, containing true if the key exists, false otherwise. |