IInvalidatesCache interface
Namespace: Vitreous.Caching.Abstractions
Assembly: Vitreous.Caching.dll
Marks a command (or query) as one that invalidates cache entries after it succeeds.
Implement this on any ICommand<TResult> or ICommand to have
cache entries removed automatically by CacheInvalidationBehavior.
public interface IInvalidatesCacheRemarks
Section titled “Remarks”Cache entries are only invalidated when the handler returns a successful Result<T>. If the handler fails, no cache keys are touched.
Properties
Section titled “Properties”CacheKeys
Section titled “ CacheKeys”Exact cache keys to remove from the store. Works with all backends (IDistributedCache and Redis).
IReadOnlyList<string> CacheKeys { get; }Property Value
Section titled “Property Value”InvalidatesTags
Section titled “ InvalidatesTags”Tags whose associated cache entries will be bulk-removed.
Only honoured by the Redis backend (Vitreous.Caching.Redis).
The base IDistributedCache backend silently ignores this.
IReadOnlyList<string> InvalidatesTags { get; }