Skip to content

Commit 0811254

Browse files
mgravelltdykstra
andauthored
Update aspnetcore/performance/caching/hybrid.md
Co-authored-by: Tom Dykstra <[email protected]>
1 parent 0acfd65 commit 0811254

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

aspnetcore/performance/caching/hybrid.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ The stateless overload of `GetOrCreateAsync` is recommended for most scenarios.
5454

5555
## Cache key guidance
5656

57-
The `key` passed to `GetOrCreateAsync` is usually formed using string concatenation, and must uniquely identify
58-
the data being cached both in terms of the identifiers/values used to load that data, and in terms of other data
59-
cached in your application. For example:
57+
The `key` passed to `GetOrCreateAsync` must uniquely identify the data being cached:
58+
59+
* In terms of the identifier values used to retrieve that data from its source.
60+
* In terms of other data cached in the application.
61+
62+
Both types of uniqueness are usually ensured by using string concatenation to make a single key string composed of different parts concatenated into one string. For example:
6063

6164
```c#
6265
cache.GetOrCreateAsync($"/orders/{region}/{orderId}", ...);

0 commit comments

Comments
 (0)