Review main Merged Breaking

73475[!!!][FEATURE] Move Cache Lifetime Calculation into its own class

Benni Mack CR +2 V +2 Hard +471 −274 updated 02/15/22, 12:12

Commit message

This change moves the logic for calculating
the max time for caching a frontend page into
a separate class.

In addition, the existing hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['get_cache_timeout']
is removed in favor of a new "ModifyCacheLifetimeForPageEvent".

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 10

Review log 2333

Show 78 earlier messages
  1. Benni Mack uploaded patch set 1 02/14/22, 11:16

  2. Mathias Brodala commented on patch set 1 02/14/22, 11:25

    CacheTimoutCalculator.php:34

    "CacheLifetimeCalculator" would be better IMO. Also there's a typo here. ;-)
  3. Chris Müller commented on patch set 1 CR -1 02/14/22, 11:30

    ModifyCacheTimoutForPageEvent.php:22

    Missing e: ModifyCacheTimeoutForPageEvent

    ModifyCacheTimoutForPageEvent.php:26

    Should these properties (without $cacheTimeout) declared readonly?
  4. Benni Mack uploaded patch set 2 02/14/22, 12:52

  5. Benni Mack updated the commit message in patch set 3 02/14/22, 12:53

  6. Benni Mack uploaded patch set 4 02/14/22, 13:01

  7. Benni Mack commented on patch set 4 02/14/22, 13:02

    CacheTimoutCalculator.php:34 Reply

    Done

    ModifyCacheTimoutForPageEvent.php:22 Reply

    Done

    ModifyCacheTimoutForPageEvent.php:26 Reply

    Done
  8. core-ci voted on patch set 2 V -1 02/14/22, 13:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23510

  1. core-ci voted on patch set 3 V -1 02/14/22, 13:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23511

  2. core-ci voted on patch set 4 V -1 02/14/22, 13:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23512

  3. core-ci voted on patch set 1 V -1 02/14/22, 13:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23506

  4. Benni Mack uploaded patch set 5 02/14/22, 13:39

  5. core-ci voted on patch set 5 V -1 02/14/22, 13:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23514

  6. Benni Mack uploaded patch set 6 02/14/22, 19:03

  7. core-ci voted on patch set 6 V +1 02/14/22, 19:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23551

  8. Benni Mack uploaded patch set 7 02/15/22, 08:00

  9. core-ci voted on patch set 7 V +1 02/15/22, 08:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23589

  10. Oli Bartsch commented on patch set 7 02/15/22, 08:48

    ModifyCacheLifetimeForPageEvent.php:22

    Should be final. Also a Short description, "Listeners to this event are able to ..." would be nice.
  11. Benni Mack commented on patch set 8 02/15/22, 08:50

    Published edit on patch set 7.
  12. Benni Mack commented on patch set 8 02/15/22, 08:50

    ModifyCacheLifetimeForPageEvent.php:22 Reply

    Done
  13. Stefan Bürk commented on patch set 8 02/15/22, 10:01

    CacheLifetimeCalculator.php:48

    Left over / uncomplete sentence ? Looks weired ...

    CacheLifetimeCalculator.php:161

    Can we inject 'ConnectionPool' through DI in this new class and avoid GU::makeInstance() ?
  14. Benni Mack uploaded patch set 9 02/15/22, 10:15

  15. Benni Mack commented on patch set 8 02/15/22, 10:15

    CacheLifetimeCalculator.php:48 Reply

    Done

    CacheLifetimeCalculator.php:161 Reply

    Done
  16. Oli Bartsch uploaded patch set 10 02/15/22, 10:33

  17. core-ci voted on patch set 10 V -1 02/15/22, 10:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23609

  18. core-ci voted on patch set 8 V -1 02/15/22, 10:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23593

  19. Oli Bartsch uploaded patch set 11 02/15/22, 11:36

  20. core-ci voted on patch set 11 V +1 02/15/22, 11:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23613

  21. Oli Bartsch commented on patch set 11 V +1 CR +1 02/15/22, 11:55

    On it
  22. Oli Bartsch commented on patch set 11 02/15/22, 11:57

    Reply

    Finished ;)
  23. Stefan Bürk voted on patch set 11 V +1 CR +1 02/15/22, 12:09

  24. Benni Mack voted on patch set 11 V +2 CR +2 02/15/22, 12:11

  25. Benni Mack merged patch set 12 02/15/22, 12:12