Clarify OutputCache intent and limitations for classic ASP.Net.#12886
Open
StephenMolloy wants to merge 2 commits into
Open
Clarify OutputCache intent and limitations for classic ASP.Net.#12886StephenMolloy wants to merge 2 commits into
StephenMolloy wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the classic ASP.NET (System.Web) API reference XML to clarify the intent and limitations of output caching variation (VaryBy*), emphasizing that it’s a performance optimization mechanism and must not be treated as a security/isolation boundary.
Changes:
- Added prominent
[!IMPORTANT]warnings across output-caching-related types about not usingVaryByto isolate personalized/tenant-sensitive/authorization-dependent responses. - Refined remarks for
VaryByParamsandVaryByHeadersto better describe what request data participates in cache variation and how alternate representations are served. - Improved wording in
System.Web.Caching.OutputCacheremarks (e.g., “alternate representations”).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| xml/System.Web/HttpCacheVaryByParams.xml | Clarifies VaryByParams behavior and adds an IMPORTANT warning about non-security usage. |
| xml/System.Web/HttpCacheVaryByHeaders.xml | Clarifies VaryByHeaders behavior and adds an IMPORTANT warning about non-security usage. |
| xml/System.Web/HttpCacheVaryByContentEncodings.xml | Adds an IMPORTANT warning about non-security usage of cache variation. |
| xml/System.Web/HttpCachePolicy.xml | Adds an IMPORTANT warning in SetVaryByCustom remarks about non-security usage of cache variation. |
| xml/System.Web.UI/PartialCachingAttribute.xml | Adds an IMPORTANT warning about non-security usage of cache variation. |
| xml/System.Web.UI/OutputCacheParameters.xml | Adds an IMPORTANT warning about non-security usage of cache variation. |
| xml/System.Web.Configuration/OutputCacheSection.xml | Adds an IMPORTANT warning about non-security usage of cache variation. |
| xml/System.Web.Configuration/OutputCacheProfile.xml | Adds an IMPORTANT warning about non-security usage of cache variation. |
| xml/System.Web.Caching/OutputCache.xml | Refines remarks wording and adds an IMPORTANT warning about non-security usage of cache variation. |
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
gewarren
approved these changes
Jul 20, 2026
Collaborator
|
@StephenMolloy The merge conflicts might be because we split the .NET Framework APIs into a separate repo - dotnet/dotnetfw-api-docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the XML documentation for several ASP.NET output caching-related types to clarify the intended use and limitations of the
VaryBysettings. The main focus is to add prominent warnings that output caching and its variation mechanisms are meant for performance optimization and not for isolating personalized or sensitive content. Additional clarifications are also made to some remarks for better accuracy.Documentation improvements and warnings
Security and usage warnings:
[!IMPORTANT]note to the remarks of all affected types, explaining that output caching andVaryBysettings are for performance optimization only, and should not be relied upon to isolate personalized, tenant-specific, authorization-dependent, or sensitive responses. Explicit isolation must be enforced independently of cache configuration. [1] [2] [3] [4] [5] [6] [7] [8] [9]Clarifications to remarks:
VaryByHeadersandVaryByParamswork, specifying that they store and serve the appropriate representation of a resource for a given request, and clarifying the types of request data used for variation. [1] [2]OutputCache.xmlremarks to use "alternate representations" instead of "different versions" for greater precision.These changes help prevent misuse of output caching for security or isolation, and make the documentation clearer for developers.