Responses lacking cachability metadata are stored indefinitely in the page cache

Created on 21 September 2015, almost 9 years ago
Updated 13 February 2023, over 1 year 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 about 10 hours 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.69.0 2024