Review main Merged

85778[FEATURE] Automatic frontend cache tagging

Sascha Nowak CR +2 V +2 Hard +368 −52 updated 09/16/24, 18:19

Commit message

Introduce more sophisticated automatic cache tagging in multiple
places of the core.

Extbase:
* A Cache tag is added for the tablename when using findAll() and
  countAll().
* A Cache tag for the storage pid is added when using th findBy*()
  and __call() methods

ContentObject:
* A Cache Tag is added for each records rendered by
  ContentContentObject and RecordContentObject

TypoLink:
* A Cache Tag is added for linked pages. This is useful for scenarios
  like having a page with start and/or end time. When a page links to
  this kind of pages the link should reflect the correct state.
  Currently it could happen the target page is "hidden" but the page
  that linked to it was served from cache and the link was still
  active.

Resources:
* A Cache Tag is added when linking to a file. This is useful when a
  file is replaced or metadata are changed the.

This feature is guarded with toggle "frontend.cache.autoTagging" and
experimental for now: The feature is still incomplete and there should
be a couple more places that add tags. Additionally, some instances
may tend to add many tags, which may have a negative impact on
performance. Automatic tagging and cache clearing by tag is the way
to go, though. But we have to gather additional feedback from the
community to gain knowledge in order to determine loose ends and
bottlenecks. As such, we decided to bring this feature into the wild
now. The feature toggle is by default *disabled* for instances being
upgraded from earlier core versions, and *enabled* for newly
created instances based on TYPO3 v13.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Benjamin Franzke +1
    • Sascha Nowak +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Benjamin Franzke +1
    • Sascha Nowak +1
    • core-ci +1 CI

Issues 2

Files 16

Review log 1624

  1. Sascha Nowak uploaded patch set 1 08/26/24, 06:43

  2. core-ci voted on patch set 1 V -1 08/26/24, 06:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64180

  3. Sascha Nowak uploaded patch set 2 V -1 08/27/24, 12:11

  4. core-ci voted on patch set 2 V -1 08/27/24, 12:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64302

  5. Benjamin Franzke rebased onto patch set 3 V -1 08/28/24, 09:33

  6. Benjamin Franzke rebased onto patch set 4 08/28/24, 09:33

  7. core-ci voted on patch set 4 V -1 08/28/24, 09:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64401

  8. Benni Mack commented on patch set 4 09/16/24, 10:30

    ResourceStorage.php:1421

    also ensure that sys-file-reference is not used either.
  9. Christian Kuhn rebased onto patch set 5 V -1 09/16/24, 10:38

  10. core-ci voted on patch set 5 V -1 09/16/24, 10:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65877

  11. Christian Kuhn commented on patch set 5 CR -1 09/16/24, 11:39

    on it.

    ResourceStorage.php:1421 Reply

    Done
  12. Christian Kuhn uploaded patch set 6 CR -1 V -1 09/16/24, 13:01

  13. core-ci voted on patch set 6 V -1 09/16/24, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65887

  14. Christian Kuhn uploaded patch set 7 V -1 09/16/24, 13:14

  15. core-ci voted on patch set 7 V +1 09/16/24, 13:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65888

  16. Christian Kuhn updated the commit message in patch set 8 V +1 09/16/24, 13:45

  17. core-ci voted on patch set 8 V +1 09/16/24, 13:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65894

  18. Christian Kuhn uploaded patch set 9 V +1 09/16/24, 15:30

  19. core-ci voted on patch set 9 V +1 09/16/24, 15:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65902

  20. Christian Kuhn voted on patch set 9 CR +1 V +1 09/16/24, 16:04

  21. Sascha Nowak voted on patch set 9 CR +1 V +1 09/16/24, 16:05

  22. Benjamin Franzke commented on patch set 9 CR +1 V +1 09/16/24, 17:56

    ResourceStorage.php:1430

    Hm, stricly speaking the file metadata is not used, when generating a public URL, right? I'm fine with it for now though…
  23. Christian Kuhn commented on patch set 9 CR +2 V +2 09/16/24, 18:18

    ResourceStorage.php:1430 Reply

    yeah, i'm not 100% sure about this detail. i guess it is ok to go with it for now and i'm looking forward to more fine tuning of this functionality in general.
  24. Christian Kuhn merged patch set 10 09/16/24, 18:19