Skip to content

MemoryCache: obsolete API removed in 3.0 #14772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JamesNK opened this issue Sep 28, 2019 · 0 comments · Fixed by #15044
Closed

MemoryCache: obsolete API removed in 3.0 #14772

JamesNK opened this issue Sep 28, 2019 · 0 comments · Fixed by #15044
Assignees
Labels
breaking-change Indicates a .NET Core breaking change

Comments

@JamesNK
Copy link
Member

JamesNK commented Sep 28, 2019

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates a .NET Core breaking change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants