Skip to content

Deprecate the never-cache-responses-with-query options and HTTP/1.0 response caching - #870

Merged
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:cache-deprecate-query-caching
Aug 15, 2026
Merged

Deprecate the never-cache-responses-with-query options and HTTP/1.0 response caching#870
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:cache-deprecate-query-caching

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Aug 13, 2026

Copy link
Copy Markdown
Member

Per the discussion on the query-string heuristic-caching report: assigning heuristic freshness to a response with a query component is no longer prohibited by the HTTP caching specification, so the CacheConfig options that suppress caching of such responses no longer serve a purpose.
This deprecates isNeverCacheHTTP10ResponsesWithQuery, isNeverCacheHTTP11ResponsesWithQuery and their builder setters, and deprecates HTTP/1.0 response caching as a whole (noted in the CacheConfig Javadoc and at the version check in ResponseCachingPolicy). Behaviour is unchanged — the options are still honoured — and an origin that does not want a response cached should send an explicit directive such as Cache-Control: no-cache.

@arturobernalg
arturobernalg requested a review from ok2c August 13, 2026 18:45
@arturobernalg arturobernalg changed the title Deprecate the never-cache-responses-with-query options and HTTP/1.0 r… Deprecate the never-cache-responses-with-query options and HTTP/1.0 Aug 14, 2026
@arturobernalg arturobernalg changed the title Deprecate the never-cache-responses-with-query options and HTTP/1.0 Deprecate the never-cache-responses-with-query options and HTTP/1.0 response caching Aug 14, 2026
@arturobernalg
arturobernalg marked this pull request as ready for review August 14, 2026 06:11

@ok2c ok2c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@arturobernalg Looks good otherwise.

@arturobernalg
arturobernalg force-pushed the cache-deprecate-query-caching branch from bef5243 to 72c777c Compare August 14, 2026 09:50
@arturobernalg
arturobernalg requested a review from ok2c August 14, 2026 10:09
…opt-in

Assigning heuristic freshness to a response with a query component is no longer prohibited by the HTTP caching specification. ResponseCachingPolicy now consults the never-cache-query options only when they are explicitly enabled, so in the default configuration a response with a query component is cached like any other. isNeverCacheHTTP10ResponsesWithQuery, isNeverCacheHTTP11ResponsesWithQuery and their builder setters are deprecated, as is HTTP/1.0 response caching. An origin that does not want a response cached should send an explicit directive such as Cache-Control: no-cache.
@arturobernalg
arturobernalg force-pushed the cache-deprecate-query-caching branch from 72c777c to b3c9784 Compare August 14, 2026 11:32
@arturobernalg
arturobernalg merged commit b149c25 into apache:master Aug 15, 2026
10 checks passed
@ok2c

ok2c commented Aug 15, 2026

Copy link
Copy Markdown
Member

@arturobernalg I tweaked some of your test case changes to keep the original asserts. I will also port the neverCache1_1ResponsesWithQueryString fix to the stable branch.

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.

2 participants