Responses lacking cachability metadata are stored indefinitely in the page cache

Created on 21 September 2015, over 9 years ago
Updated 13 February 2023, almost 2 years ago

Problem/Motivation

Plain Symfony Response objects returned from a custom controller are stored with expire=Cache::PERMANENT in the internal page cache regardless of Cache-Control directives. This is problematic for responses lacking any cacheability metadata (cache tags), since in that case a response stored in that way will never be invalidated.

Proposed resolution

Derive the expiry value for the cache object from Cache-Control header if a response lacks the X-Drupal-Cache-Tags header.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

9.5

Component
Request processing 

Last updated 7 days ago

No maintainer
Created by

🇨🇭Switzerland znerol

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024