The 5xx cache maximum age setting doesn't do anything

Created on 2 June 2025, 10 days ago

Problem/Motivation

It looks like the 5xx cache maximum age setting doesn't actually do anything. Even if you explicitly create a cacheable 500 response like this:

return new CacheableResponse(status: 500);

there's Drupal\Core\PageCache\ResponsePolicy\NoServerError that marks the request as non-cacheable.

Proposed resolution

Remove the setting.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024