-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
breaking-changeIndicates a .NET Core breaking changeIndicates a .NET Core breaking change
Description
MemoryCache: obsolete API removed in 3.0
This is a follow up to aspnet/Caching#221. The 3.0 release will remove the obsolete MemoryCacheOptions APIs.
Discussion: dotnet/extensions#1062.
Version introduced
3.0
Old behavior
MemoryCacheOptions.CompactOnMemoryPressure property was available.
New behavior
MemoryCacheOptions.CompactOnMemoryPressure has been removed.
Reason for change
Automatically compacting the cache caused problems. We recommend compacting the cache when needed to avoid unexpected behavior.
Recommended action
To compact, downcast to MemoryCache and call Compact when needed.
Category
- ASP.NET Core
Affected APIs
MemoryCacheOptions.CompactOnMemoryPressure
Issue metadata
- Issue type: breaking-change
Metadata
Metadata
Assignees
Labels
breaking-changeIndicates a .NET Core breaking changeIndicates a .NET Core breaking change