https://github.com/r-manimaran/dotnet-hybridcache
Different Cache Options (MemCache, Distributed Cache, new Hybrid Cache) in dotnet
https://github.com/r-manimaran/dotnet-hybridcache
cache distributed-cache dotnet-core hybrid-cache memcache
Last synced: 5 months ago
JSON representation
Different Cache Options (MemCache, Distributed Cache, new Hybrid Cache) in dotnet
- Host: GitHub
- URL: https://github.com/r-manimaran/dotnet-hybridcache
- Owner: r-manimaran
- Created: 2024-11-15T03:35:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-16T16:47:02.000Z (about 1 year ago)
- Last Synced: 2025-03-25T07:14:12.201Z (11 months ago)
- Topics: cache, distributed-cache, dotnet-core, hybrid-cache, memcache
- Language: C#
- Homepage:
- Size: 899 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dotnet-HybridCache
Different Cache Options (MemCache, Distributed Cache, new Hybrid Cache) in dotnet
Asp.net Core has traditionally offered two caching options.
1. In-Memory caching
2. Distributed caching
- In-Memory Cache with (IMemoryCache) is Fast, but limited to a single-server.
- Distributed caching with (IDistributedCache) works across multiple servers.
.Net 9 introduces HybridCache, that combines the best of both approaches. It prevents the common caching problems like cache stampede.
**Hybrid-Cache**
**Important Feaures**
- Two-level Caching (L1/L2)
- L1: Fast In-Memory cache
- L2: Distributed Cache (Redis)
- Protection against cache stampede
- Tag based cache invalidation
- Configurable Serialization
- Metrics and monitoring
L1 cache runs in application's memory.
L2 cache can be Redis,SQL Server etc.