ICacheableQuery<TResult> interface
Namespace: Vitreous.Caching.Abstractions
Assembly: Vitreous.Caching.dll
Marks a query as cacheable. Implement this on any IQuery<TResult> to have its
result automatically cached by CachingBehavior.
public interface ICacheableQuery<TResult> : IQuery<TResult>Type Parameters
Section titled “Type Parameters”TResult
The result type returned by the query.
Implements
Section titled “Implements”Properties
Section titled “Properties”AbsoluteExpiration
Section titled “ AbsoluteExpiration”How long the cached value lives. When set, takes precedence over SlidingExpiration. Null means no absolute expiry.
TimeSpan? AbsoluteExpiration { get; }Property Value
Section titled “Property Value”CacheKey
Section titled “ CacheKey”The unique cache key for this query instance.
Should incorporate any parameters that affect the result, e.g. $“order:{Id}”.
string CacheKey { get; }Property Value
Section titled “Property Value”SlidingExpiration
Section titled “ SlidingExpiration”Sliding window expiration — the entry expires if not accessed within this window. The Redis backend applies it as a fixed TTL instead (use AbsoluteExpiration there). Null means no sliding expiry.
TimeSpan? SlidingExpiration { get; }Property Value
Section titled “Property Value”Optional tags attached to this cache entry.
The base IDistributedCache backend ignores tags.
The Redis backend uses them for tag-based bulk invalidation via IInvalidatesCache.
IReadOnlyList<string> Tags { get; }