Interface ICacheInvalidationService
Service for removing cached entries.
public interface ICacheInvalidationService
- Extension Methods
Methods
InvalidateKeysAsync(IEnumerable<string>, CancellationToken)
Invalidates cached items associated with the provided keys.
Task InvalidateKeysAsync(IEnumerable<string> keys, CancellationToken cancellationToken)
Parameters
keysIEnumerable<string>Cache keys to remove.
cancellationTokenCancellationTokenToken used to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
InvalidateTagsAsync(IEnumerable<string>, CancellationToken)
Invalidates cached items associated with the provided tags.
Task InvalidateTagsAsync(IEnumerable<string> tags, CancellationToken cancellationToken)
Parameters
tagsIEnumerable<string>Tags to remove.
cancellationTokenCancellationTokenToken used to cancel the operation.
Returns
- Task
A task representing the asynchronous operation.
Remarks
Completion does not guarantee immediate visibility on other application instances. Invalidation of multiple tags is not atomic; cancellation or failure may occur after some tags have already been invalidated.