We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1227540 commit 5c2a527Copy full SHA for 5c2a527
BitFaster.Caching/Lfu/ConcurrentLfu.cs
@@ -188,9 +188,13 @@ public void Trim(int itemCount)
188
TakeCandidatesInLruOrder(this.probationLru, candidates, itemCount);
189
TakeCandidatesInLruOrder(this.protectedLru, candidates, itemCount);
190
TakeCandidatesInLruOrder(this.windowLru, candidates, itemCount);
191
- }
192
-
+ }
+
193
+#if NET6_0_OR_GREATER
194
+ foreach (var candidate in CollectionsMarshal.AsSpan(candidates))
195
+#else
196
foreach (var candidate in candidates)
197
+#endif
198
{
199
this.TryRemove(candidate.Key);
200
}
0 commit comments