-
Notifications
You must be signed in to change notification settings - Fork 1
Home
github-actions[bot] edited this page May 26, 2026
·
2 revisions
CleverCache solves the problem of remembering when to invalidate cache entries when the underlying data changes — especially when a single cache entry contains data from multiple entity types.
With a small amount of configuration, CleverCache automatically tracks changes via EF Core and clears related cache entries when any tracked entity is created, updated, or deleted.
| Topic | Description |
|---|---|
| Getting Started | Install, configure EF Core interceptor, register services |
| Caching Data |
GetOrCreate, multi-type associations, entry options |
| Cache Providers | Memory, distributed, Redis, custom providers |
| Dependent Caches |
AddKeyToType, AddDependentCache, [DependentCaches] attribute |
| MediatR Integration |
[AutoCache], [InvalidatesCache], pipeline setup |
| Bulk Operations | Handling ExecuteDelete/ExecuteUpdate and non-EF writes |
| Diagnostics | Inspecting the dependency graph and tracked keys at runtime |
| Unit Testing |
FakeCache, mocking ICleverCache
|
| Migrating to V2 | Breaking changes and before/after examples for V1 → V2 |
EF Core. Automatic invalidation via
SaveChangesrequires theCleverCache.EntityFrameworkCorepackage. Without EF Core you can still use CleverCache for manual invalidation — see Bulk Operations.