Issue Bug Closed

#83045Page Cache Timeout calculation doesnt take cache configuration of content into account

Matthias Kümpel 11/20/17, 12:36 updated 12/02/25, 14:36

Description

As far as i understand the current implementation, it works like this (simplified):

- The Page Cache Timeout calculation in the TypoScriptFrontendController determines the cache timeout based on the config.cache_period, manual page settings in the backend and (optional) start stop times.
- This value is then used to populate the HTTP header “Cache-Control:max-age=…, if config.sendCacheHeaders is set to 1.

But if i place an TS object on the page with a custom caching configuration, this does not affect the HTTP header sent to the browser (or Varnish in my case).

Example:
lib.dynamicContent = COA
lib.dynamicContent.cache.key = mykey
lib.dynamicContent.cache.lifetime = 3600

I would expect that now the “Cache.Control:max-age” header should be 3600 (-EXEC TIME), but it remains to be the page specific value.

In my opinion this is a must have, otherwise the content specific caching configuration is only of very limited use.

Reviews 2

History 413

  1. Susanne Moog changed category 03/25/20, 20:32

  2. Gerrit Code Review pushed patch set 1 for main to change 90125 status New Under Review 07/22/25, 21:26

  3. Benjamin Franzke commented 07/25/25, 12:17

    Another reproduction example (by @benni):

    page = PAGE
    page.10 = TEXT
    page.10.value = <h3>Benni in default</h3><br>
    page.20 = TEXT
    page.20.date = Y-m-d H:i:s
    page.20.cache.key = mykey
    page.20.cache.lifetime = 30
  4. Gerrit Code Review pushed patch set 2 for main to change 90125 08/15/25, 05:19

  5. Gerrit Code Review pushed patch set 3 for main to change 90125 08/15/25, 05:24

  6. Gerrit Code Review pushed patch set 4 for main to change 90125 08/15/25, 05:24

  7. Gerrit Code Review pushed patch set 5 for main to change 90125 08/15/25, 05:29

  8. Gerrit Code Review pushed patch set 6 for main to change 90125 08/15/25, 05:50

  9. Gerrit Code Review pushed patch set 7 for main to change 90125 08/15/25, 14:41

  10. Gerrit Code Review pushed patch set 8 for main to change 90125 08/18/25, 05:27

  11. Gerrit Code Review pushed patch set 1 for 13.4 to change 90432 08/18/25, 12:33

  12. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % 08/18/25, 13:00

    Applied in changeset commit:7a9b2bccefbcbb9bef3faea49a47c4f6fee1cab9.

  13. Benni Mack changed status Resolved Closed 12/02/25, 14:36