Skip to content

Commit 9425e4d

Browse files
authored
Cache improvements: support reference identity and no eviction mode (#18859)
1 parent 3759ae6 commit 9425e4d

File tree

6 files changed

+455
-191
lines changed

6 files changed

+455
-191
lines changed

src/Compiler/Checking/import.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ type TTypeCacheKey =
9292

9393
let typeSubsumptionCache =
9494
// Leave most of the capacity in reserve for bursts.
95-
lazy Cache.Create<TTypeCacheKey, bool>({ TotalCapacity = 131072; HeadroomPercentage = 75 }, name = "TypeSubsumptionCache")
95+
let options = { CacheOptions.getDefault() with TotalCapacity = 131072; HeadroomPercentage = 75 }
96+
lazy new Cache<TTypeCacheKey, bool>(options, "typeSubsumptionCache")
9697

9798
//-------------------------------------------------------------------------
9899
// Import an IL types as F# types.

0 commit comments

Comments
 (0)