Skip to content

Commit 24e6927

Browse files
authored
Merge pull request #37398 from dotnet/main
Merge to Live
2 parents f5dcda4 + 645e5e4 commit 24e6927

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

aspnetcore/performance/caching/hybrid.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use HybridCache library in ASP.NET Core.
55
monikerRange: '>= aspnetcore-9.0'
66
ms.author: tdykstra
77
ms.custom: sfi-ropc-nochange
8-
ms.date: 05/22/2025
8+
ms.date: 07/28/2026
99
uid: performance/caching/hybrid
1010
ms.ai: assisted
1111
---
@@ -38,7 +38,7 @@ The `HybridCache` service provides a <xref:Microsoft.Extensions.Caching.Hybrid.H
3838

3939
The method uses the key to try to retrieve the object from the primary cache. If the item isn't found in the primary cache (a cache miss), it then checks the secondary cache if one is configured. If it doesn't find the data there (another cache miss), it calls the factory method to get the object from the data source. It then stores the object in both primary and secondary caches. The factory method is never called if the object is found in the primary or secondary cache (a cache hit).
4040

41-
The `HybridCache` service ensures that only one concurrent caller for a given key calls the factory method, and all other callers wait for the result of that call. The `CancellationToken` passed to `GetOrCreateAsync` represents the combined cancellation of all concurrent callers.
41+
A `HybridCache` instance ensures that only one concurrent caller for a given key calls the factory method, and all other callers using the same instance wait for the result of that call. The cancellation token passed to the factory is canceled when all callers awaiting the shared operation have canceled. This coordination doesn't extend to other `HybridCache` instances, even if they use the same secondary distributed cache.
4242

4343
### The main `GetOrCreateAsync` overload
4444

aspnetcore/performance/caching/hybrid/includes/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ simple API for adding new caching code. If the app has an `IDistributedCache` im
1111

1212
* Stampede protection.
1313

14-
*Cache stampede* happens when a frequently used cache entry is revoked, and too many requests try to repopulate the same cache entry at the same time. `HybridCache` combines concurrent operations, which ensures that all requests for a given response wait for the first request to populate the cache.
14+
*Cache stampede* happens when a frequently used cache entry is revoked, and too many requests try to repopulate the same cache entry at the same time. `HybridCache` combines concurrent operations that use the same `HybridCache` instance, which ensures that all requests for a given response wait for the first request to populate the cache. This coordination doesn't extend to other `HybridCache` instances.
1515

1616
* Configurable serialization.
1717

0 commit comments

Comments
 (0)