Analysis updated 2026-07-03
Add two-level caching to an ASP.NET app so database reads are fast locally and shared across multiple servers via Redis
Prevent cache stampede in a high-traffic API by letting FusionCache automatically queue duplicate rebuild requests
Serve stale cached data as a fallback when the database is temporarily down, avoiding error responses to users
Tag related cache entries together so you can expire all product-related cache entries at once after a catalog update
| ziggycreatures/fusioncache | mathnet/mathnet-numerics | umlx5h/llplayer | |
|---|---|---|---|
| Stars | 3,737 | 3,735 | 3,735 |
| Language | C# | C# | C# |
| Setup difficulty | moderate | easy | moderate |
| Complexity | 3/5 | 3/5 | 3/5 |
| Audience | developer | researcher | general |
Figures from each repo's GitHub metadata at analysis time.
Requires a Redis instance for distributed L2 caching, in-memory-only mode works with no external dependencies.
FusionCache is a caching library for .NET applications written in C#. Caching is the practice of storing frequently needed data in fast memory so that your application does not have to recalculate or re-fetch it from a slower source (like a database) on every request. FusionCache aims to make this easier and more reliable than typical caching setups. It works as a hybrid cache, meaning it can operate with a single in-memory store or with two layers at once: a fast local layer in memory (L1) and a slower distributed layer like Redis or another shared cache (L2). Using two layers means multiple servers in a cluster all benefit from the shared distributed cache while still keeping the fastest reads from local memory. A backplane component keeps the local caches on all nodes in sync when data changes. The library addresses several problems that commonly cause caches to misbehave. Cache stampede, for instance, is a situation where many requests all try to rebuild the same missing cache entry at the same time, flooding the database with identical queries. FusionCache prevents this automatically. It also includes a fail-safe mechanism: if the source system is temporarily unavailable when a cached entry expires, it serves the stale (expired) value as a fallback instead of returning an error. Timeouts prevent a slow database or distributed cache from making your application unresponsive. For observability, the library integrates with OpenTelemetry (a standard way to trace and monitor what is happening in a running application), exposes structured logs through the standard .NET logging interface, and emits events at both high-level and low-level operations. Named caches let an application maintain several independent cache configurations. A tagging system lets you group related entries and expire them together. FusionCache received a Google Open Source Award in 2021, and is used in production at significant scale. Microsoft uses it in its Data API Builder product. It targets .NET Standard 2.0, which means it runs on older as well as modern versions of .NET.
FusionCache is a .NET caching library that prevents common cache failures like stampedes and outages, and supports both in-memory and distributed caches like Redis in one setup.
Mainly C#. The stack also includes C#, .NET, Redis.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.