Skip to content

Update docs for SRC.MemoryCache #11375

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

Merged
merged 2 commits into from
Jun 2, 2025

Conversation

StephenMolloy
Copy link
Member

Update docs for SRC.MemoryCache - memory limits were being presented
This pull request updates the documentation for the MemoryCache class in System.Runtime.Caching to clarify the behavior of memory limit properties (CacheMemoryLimit and PhysicalMemoryLimit) across different .NET versions and their impact on cache eviction.

Updates to MemoryCache documentation:

Changes to CacheMemoryLimit property:

  • Clarified that the CacheMemoryLimit property does not enforce memory limits in .NET Core and .NET 5.0 or later, but remains functional in .NET Framework. Updated remarks to reflect this behavior and removed outdated information about gradual enforcement using internal heuristics.

Changes to PhysicalMemoryLimit property:

  • Updated the description to specify that the PhysicalMemoryLimit property triggers cache eviction based on overall system memory usage rather than limiting the memory usage of a single MemoryCache instance. Revised remarks to emphasize its role in reducing memory pressure when system-wide physical memory usage exceeds the configured threshold.incorrectly

Summary

Describe your changes here.

Fixes #Issue_Number (if available)
dotnet/runtime#114714
dotnet/runtime#74676
dotnet/runtime#62516

@StephenMolloy StephenMolloy requested a review from gewarren May 30, 2025 19:26
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 30, 2025
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple suggestions to match style guidance.

Looks fine to me.

Co-authored-by: Genevieve Warren <[email protected]>
@gewarren gewarren merged commit 60cd453 into dotnet:main Jun 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants