You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/performance/caching/hybrid.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,9 +54,12 @@ The stateless overload of `GetOrCreateAsync` is recommended for most scenarios.
54
54
55
55
## Cache key guidance
56
56
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:
0 commit comments