Skip to content

Vitreous.Caching.Abstractions namespace

ICacheableQuery<TResult>

Marks a query as cacheable. Implement this on any IQuery<TResult> to have its result automatically cached by CachingBehavior.

IInvalidatesCache

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.

IVitreousCache

Abstraction over the underlying cache store. Register the default implementation (DistributedVitreousCache) for IDistributedCache-backed caching, or the Redis implementation (RedisVitreousCache from Vitreous.Caching.Redis) for full tag-based invalidation support.

IVitreousCacheSerializer

Converts cached values to and from bytes. Used by both the IDistributedCache backend and the Redis backend.