Skip to content

Commit 4d5da2f

Browse files
Copilottdykstra
andauthored
Fix HybridCache immutability documentation - require both conditions for object reuse (#36029)
--------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: tdykstra <[email protected]>
1 parent 64b6574 commit 4d5da2f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aspnetcore/performance/caching/hybrid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Because much `HybridCache` usage will be adapted from existing `IDistributedCach
210210
* They're immutable types.
211211
* The code doesn't modify them.
212212

213-
In such cases, inform `HybridCache` that it's safe to reuse instances by making at least one of the following changes:
213+
In such cases, inform `HybridCache` that it's safe to reuse instances by making both of the following changes:
214214

215215
* Marking the type as `sealed`. The `sealed` keyword in C# means that the class can't be inherited.
216216
* Applying the `[ImmutableObject(true)]` attribute to the type. The `[ImmutableObject(true)]` attribute indicates that the object's state can't be changed after it's created.

aspnetcore/release-notes/aspnetcore-9/includes/hybrid-cache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Because a lot of `HybridCache` usage will be adapted from existing `IDistributed
114114
* If the types being cached are immutable.
115115
* If the code doesn't modify them.
116116

117-
In such cases, inform `HybridCache` that it's safe to reuse instances by:
117+
In such cases, inform `HybridCache` that it's safe to reuse instances by making both of the following changes:
118118

119119
* Marking the type as `sealed`. The `sealed` keyword in C# means that the class can't be inherited.
120120
* Applying the `[ImmutableObject(true)]` attribute to it. The `[ImmutableObject(true)]` attribute indicates that the object's state can't be changed after it's created.

0 commit comments

Comments
 (0)