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.
The only way for this setting to take effect would be if the page_cache_no_server_error service would be removed through a service modifier. That's such a niche situation that I don't think it's worth supporting.
Proposed resolution
Remove the setting.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | http_cache_control-3527918-1.patch | 578 bytes | rtkr |
Issue fork http_cache_control-3527918
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dieterholvoet commentedComment #5
dieterholvoet commentedComment #9
rtkr commentedThe hook update http_cache_control_update_8103 doesn't remove 5xx_max_age correctly. I've created merge request with correct key.
Comment #10
dieterholvoet commentedMy bad! This update hook is already released though, so we'll need to add a new one instead of change the existing one.
Comment #13
dieterholvoet commented