Details
-
Improvement
-
Resolution: Fixed
-
High
-
5.4.10, 1.7.5, 1.11.0
-
None
Description
Currently, if TTL cache is enabled, eZ Platform sets the s-maxage header equal to "default_ttl" option on all responses. Their status code is not taken into the account.
However, there should be an option to set different s-maxage header for the responses with "temporary" status codes, such as 302 or 500 (and possibly others).
There should either be an option to set custom s-maxage header on a given route so it does not use default TTL, or there should be a change to the code setting s-maxage header so it sets different TTL for the set of known "temporary" status codes.
The code responsible for setting the header can be found here: https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/EventListener/CacheViewResponseListener.php#L70.
This task was created as a result of a Customer Request (CS-6270).