Clarify OutputCache intent and limitations for classic ASP.Net.#12885
Closed
StephenMolloy wants to merge 2 commits into
Closed
Clarify OutputCache intent and limitations for classic ASP.Net.#12885StephenMolloy 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 output-caching API reference docs to clearly warn that VaryBy* settings are intended for performance (caching alternate representations), not for isolating personalized or sensitive content.
Changes:
- Added a prominent
[!IMPORTANT]warning across multiple output-caching related types clarifyingVaryBy*is not a security/isolation boundary. - Expanded remarks in
HttpCacheVaryByHeadersandHttpCacheVaryByParamsto explicitly describe serving the appropriate cached representation for a given request. - Refined the
OutputCacheremarks to describe caching “alternate representations” of content.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| xml/System.Web/HttpCacheVaryByParams.xml | Adds clarification + IMPORTANT warning; expands description of what VaryByParams does. |
| xml/System.Web/HttpCacheVaryByHeaders.xml | Adds clarification + IMPORTANT warning; expands description of what VaryByHeaders does. |
| xml/System.Web/HttpCacheVaryByContentEncodings.xml | Adds IMPORTANT warning about VaryBy* not being for isolation/security. |
| xml/System.Web/HttpCachePolicy.xml | Adds IMPORTANT warning in remarks for SetVaryByCustom. |
| xml/System.Web.UI/PartialCachingAttribute.xml | Adds IMPORTANT warning for fragment caching docs. |
| xml/System.Web.UI/OutputCacheParameters.xml | Adds IMPORTANT warning to discourage security misuse of cache variation. |
| xml/System.Web.Configuration/OutputCacheSection.xml | Adds IMPORTANT warning for configuration section docs. |
| xml/System.Web.Configuration/OutputCacheProfile.xml | Adds IMPORTANT warning for cache profile docs. |
| xml/System.Web.Caching/OutputCache.xml | Updates remarks wording and adds IMPORTANT warning about cache variation limitations. |
CR nits which are very slightly clarifying. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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 documentation for output caching across several files to clarify the intended use and limitations of the
VaryBysettings. The main addition is a prominent warning that output caching and its variation mechanisms are designed for performance optimization, not for isolating sensitive or personalized content. Developers are advised not to rely on cache variation for security or audience separation, and to enforce isolation independently of cache configuration.The most important changes are:
Documentation improvements and warnings:
[!IMPORTANT]note to the remarks sections of all relevant output caching types (OutputCache,OutputCacheProfile,OutputCacheSection,OutputCacheParameters,PartialCachingAttribute,HttpCachePolicy,HttpCacheVaryByContentEncodings,HttpCacheVaryByHeaders, andHttpCacheVaryByParams) warning thatVaryBysettings are for performance optimization, not for isolating audiences or sensitive content, and that developers must enforce isolation separately. [1] [2] [3] [4] [5] [6] [7] [8] [9]Clarification of behavior:
HttpCacheVaryByHeaders.xmlandHttpCacheVaryByParams.xmlto explain howVaryByHeadersandVaryByParamsallow the output cache to store and serve the appropriate representation of a resource for a given request. [1] [2]These changes help prevent misuse of output caching for security or content isolation, reducing the risk of unintentional data exposure.