Skip to content

[release/10.0] Honor custom policies allowing output caching for authenticated users - #69725

Merged
wtgodbe merged 1 commit into
release/10.0from
backport/pr-69580-to-release/10.0
Oct 9, 2026
Merged

wtgodbe merged 1 commit into
release/10.0from
backport/pr-69580-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #69580 to release/10.0

Description

Since #67110, DefaultPolicy.ServeResponseAsync clears AllowCacheStorage for any authenticated user. That check is only needed when the user becomes authenticated after the output cache middleware ran. It also overrode custom policies that allow storage in CacheRequestAsync for users who were already authenticated, so those responses silently stopped being cached.

Customer Impact

Breaks users who register their custom policy for the documented way to use it. As per original issue:

This is the documented way to cache responses that do not vary by caller, and the output caching docs describe overriding the default policy's opinions as the intended extension point

Regression?

yes, in .NET10

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

small concentrated fix, does not impact most of the users. Requires setup with custom policy + auth middlewares

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@wtgodbe
wtgodbe merged commit 0a492d3 into release/10.0 Oct 9, 2026
31 checks passed
@wtgodbe
wtgodbe deleted the backport/pr-69580-to-release/10.0 branch October 9, 2026 15:17
@dotnet-policy-service dotnet-policy-service Bot added this to the 10.0.14 milestone Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants