Redis back-end for Metalama.Patterns.Caching. Implements both caching and cache invalidation over Redis Pub/Sub
Install
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard | |
| Other |
README
About
The Metalama.Patterns.Caching.Backends.Redis package complements the Metalama.Patterns.Caching package by adding a Redis-based cache implementation. It also synchronizes multiple in-memory caches, each typically deployed on a different node, through Redis Pub/Sub. This package is based on StackExchange.Redis.
Features
- A Redis-based CachingBackend implementation. This allows you to use the Metalama.Patterns.Caching package with Redis instead of just a local memory cache.
- The invalidation of multiple local caches through Redis Pub/Sub.
- A garbage collection task for use when dependencies are enabled.
License
This package is a commercial extension of the open-source Metalama.Patterns.Caching and requires a Metalama Professional license.
Main Types
- RedisCachingFactory provides extension methods to configure the Redis caching back-end, specifically:
- Redis configures a Redis-backend.
- WithRedisSynchronization configures cache invalidation over Redis Pub/Sub.
- AddRedisCacheDependencyGarbageCollector adds the garbage collection service to the service collection. CreateRedisCacheDependencyGarbageCollector returns a new instance of this service without adding it to any collection.
Additional Documentation
- Conceptual documentation:
- API Documentation
Related Packages
- Metalama.Patterns.Caching defines the cache API abstractions.
- Metalama.Patterns.Caching.Aspects provides an aspect-oriented API over Metalama.Patterns.Caching and is typically the entry point package.
- Metalama.Patterns.Caching.Backends.Azure implements distributed cache invalidation over Azure Service Bus instead of Redis Pub/Sub.
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.