Explore tweets tagged as #IDistributedCache
Hybrid Cache in .NET = blazing speed + strong consistency! Combines IMemoryCache + IDistributedCache 1. Built-in stampede protection 2. Cache-Aside via GetOrCreateAsync 3. Fast, scalable, cloud-ready Tried it yet? ๐ #dotnet #caching #systemdesign #webdev
0
0
0
first image is typical IDistributedCache usage; very manual; you could manually add IMemoryCache, making it more complex; second image is 2 ways ("simple" via capture, and "stateful" optimized version) of doing same with HybridCache, but this adds *so much more too*
1
0
9
๐๐๐ฏ๐ฟ๐ถ๐ฑ๐๐ฎ๐ฐ๐ต๐ฒ ๐ถ๐ ๐ฐ๐ผ๐บ๐ถ๐ป๐ด ๐ถ๐ป .๐ก๐๐ง ๐ต This is a brand new caching API that's coming in .NET 9. HybridCache aims to solve the shortcomings of IMemoryCache and IDistributedCache. A few things that HybridCache offers: - Unified API for both in-process
0
57
288
Here is why I will not use IMemoryCache and IDistributedCache anymore. From the .NET 9 things are different. โฌ๏ธ .NET 9 introduces ๐๐ฒ๐๐ซ๐ข๐๐๐๐๐ก๐, a caching mechanism that combines the speed of in-memory caching with the scalability of distributed caching. Itย is an
3
19
128
@marcgravell @jsneedles @neuecc Cloned the repo locally, made the class public and the services arg nullable + optional with sensible defaults, and... tada ๐ฌ I present to you FASTER, with your IDistributedCache impl, working with FusionCache, inside the Simulator ๐ (the backplane is in memory for now)
1
0
7
๐ง๐ต๐ฒ ๐ผ๐ป๐ฒ ๐ฐ๐ฎ๐ฐ๐ต๐ถ๐ป๐ด ๐ฝ๐ฎ๐๐๐ฒ๐ฟ๐ป ๐๐ผ๐ ๐ป๐ฒ๐ฒ๐ฑ ๐๐ผ ๐ธ๐ป๐ผ๐. It's called the Cache-aside pattern. Fun fact: another name for this pattern is Lazy Loading. In my latest video, we'll discuss: - IMemoryCache, IDistributedCache - Briefly talk about .NET 9
1
39
187
๐ FusionCache: 2nd Level To help with cold starts or horizontal scalability, FusionCache can automatically handle a distributed 2nd level: any impl of IDistributedCache will work. Also, the existing code does not need to change, it all just works. https://t.co/iOPOIRfhLf
0
0
4
๐๐๐ฏ๐ฟ๐ถ๐ฑ๐๐ฎ๐ฐ๐ต๐ฒ ๐ถ๐ป .๐ก๐๐ง ๐ต .NET 9 introduces a new caching API: HybridCache. It solves the limits of IMemoryCache and IDistributedCache. What does it offer? - Unified API (in-process + out-of-process) - Configurable serialization - Stampede protection - Tag-based
5
23
148
Cache-Aside is perhaps the most straightforward caching pattern, which can be explained as: - Look if there's a cache record and get it. If not, get it from DB and put it in the cache. Plain simple. I've got a couple of handy extension methods on IDistributedCache in #dotnet ๐
2
5
21
@davidfowl Also, it may be usable soon as an IDistributedCache impl ๐ค https://t.co/NUPrwoZOHu
1
1
19
@JP_sansan ใใฎใฉใคใใฉใชใฏๅญใใชใใงใ๐ท ๆจๆบใฉใคใใฉใชใฎ IDistributedCache ใไฝฟใใฎใไธ่ฌ็ใใจ๐ทๅๆฃใญใฃใใทใฅใฃใฆใฏใผใใงๆค็ดขใใใจmsใใญใฅใกใณใใง่จ่ผใใใฆใใใใจ๐ท
1
0
1
... since it's protocol compatible with Redis, just use its standard impl of IDistributedCache (Microsoft.Extensions.Caching.StackExchangeRedis) as a 2nd level with FusionCache and you're good to go. Like, immediately today ๐ฅณ https://t.co/iOPOIRfhLf
2
0
8
Curious how to integrate the newer HybridCache that @danroth27 showcased yesterday with the new https://t.co/XRivLbcxWP API that already integrates with IDistributedCache ๐ค @stevensanderson. It's likely quite trivial...
0
0
1
@mjovanovictech Looks like as part of the major NET9 theme, Microsoft is augmenting the IDistributedCache interface and will be using it to support a richer RateLimiting feature set. https://t.co/v7sFXXD1mZ
1
0
1
@dotnet based on this article from #microsft it is said that "HybridCache is almost 1000x faster than using IDistributedCache in high cache hit rate scenarios thanks to its multi-tiered cache storage" check it out yourself ๐ฏ https://t.co/5OUaMl3cuX
0
0
0
๐ค Hey C# friends, thoughts on adding GetOrCreate and GetOrCreateAsync APIs to the IDistributedCache? I believe it could even be done as a default interface implementation, see here and comment: https://t.co/9wR2ptt3gx
6
5
32
๐คthis close to getting the first cut of HybridCache merged for next preview; combines: - radically simple API - IDistributedCache (L2) - IMemoryCache (L1) - stampede prevention - fully configurable serialization coming soon: - tagging - L2-assisted eviction - compression +more
15
12
170