A caching front-end that can be plugged different backends and helps with building the cache key, coping with special return types, invalidating the cache (directory or with dependencies). This package does not require the Metalama Aspect Framework.
$ dotnet add package Metalama.Patterns.CachingThe Metalama.Patterns.Caching package is a front-end library for caching. It simplifies caching method results and invalidating the cached results.
This package is designed for use with the Metalama.Patterns.Caching.Aspects package, which offers Metalama-based aspects for caching, cache invalidation, and cache key generation. However, the Metalama.Patterns.Caching package does not rely on the Metalama aspect framework, and it can be used independently or with another aspect framework.
Flashtrace.Formatters package.This package can interact with any cache implementation. The abstraction is provided by the CachingBackend class from the Metalama.Patterns.Caching.Backend package.
The primary types in this package are:
ICachingService and should generally not be directly used unless you are not using dependency injection.IServiceCollection and allows the addition of ICachingService to your application.Metalama.Patterns.Caching.Aspects provides an aspect-oriented API for the current package.Metalama.Patterns.Caching.Backend defines the CachingBackend abstraction and provides core implementations for in-memory and multi-layered caching.Metalama.Patterns.Caching.Backends.Redis offers the CachingBackend implementation for Redis.Metalama.Patterns.Caching.Backends.Azure implements pub/sub synchronization of distributed in-memory caches through Azure Message Bus.Flashtrace.Formatters provides an infrastructure for cache key formatting.