Add ability to cache by response content by OlegYch · Pull Request #13784 · playframework/playframework
Navigation Menu
{{ message }}
playframework / playframework Public
- Notifications You must be signed in to change notification settings
- Fork 4k
Open
OlegYch wants to merge 1 commit intoplayframework:mainfrom
Open
Add ability to cache by response content#13784
OlegYch wants to merge 1 commit intoplayframework:mainfrom
Add ability to cache by response content#13784
OlegYch wants to merge 1 commit intoplayframework:mainfrom
Conversation
Copy link Copy Markdown
Contributor
OlegYch
commented
Feb 12, 2026
OlegYch
commented
This brings Cached implementation closer to http spec by:
- actually using response content as described by https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag
- preserving headers as described by https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/304
For compatibility reasons new ability is gated via play.cache.hashResponse config entry. It should probably become default in the future as the old ETag value based on expiration date (essentially random value) doesn't seem to be useful or specified anywhere in http.
fixes #13783
…and 200 This brings Cached implementation closer to http spec by: 1. actually using response content as described by https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag 2. preserving headers as described by https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/304 For compatibility reasons new ability is gated via `play.cache.hashResponse` config entry. It should probably become default in the future as the old ETag value based on expiration date (essentially random value) doesn't seem to be useful or specified anywhere in http. closes playframework#13783
OlegYch
force-pushed
the
cache-response
branch
from
bfcd645 to
807df79
Compare
Copy link Copy Markdown
Member
mkurz
commented
Mar 26, 2026
mkurz commented
Mar 26, 2026This 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