Review main Merged

87390[BUGFIX] Do not calculate negative cache lifetime

Sascha Nowak CR +2 V +2 Easy +1 −1 updated 12/09/24, 12:21

Commit message

When a record's starttime or endtime is in the past,
the cache lifetime is set to a negative number.
This leads to errors in redis and pages not being cached correctly.

Review

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

Issues 1

Files 1

Review log 911

  1. Sascha Nowak uploaded patch set 1 12/06/24, 15:29

  2. Garvin Hicking updated the commit message in patch set 2 12/06/24, 15:33

  3. core-ci voted on patch set 1 V +1 12/06/24, 15:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70711

  4. core-ci voted on patch set 2 V +1 12/06/24, 15:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70712

  5. Sascha Nowak voted on patch set 2 CR +1 V +1 12/06/24, 15:48

  6. Patrick Schriner commented on patch set 2 12/06/24, 18:00

    Wouldn't it be simpler to add a max(0,min ...) call?
  7. Christian Kuhn commented on patch set 2 CR +1 V +1 12/09/24, 11:40

    Reply

    does not matter too much, i'd say. i think we can leave it as is.
  8. Sascha Nowak commented on patch set 2 12/09/24, 11:44

    Reply

    It does, as a cache timeout of 0 would mean, do not cache it. If the page has a starttime in the past this would mean we would not cache this page when we return 0.
  9. Anja Leichsenring voted on patch set 2 CR +1 V +1 12/09/24, 12:09

  10. Christian Kuhn voted on patch set 2 CR +2 V +2 12/09/24, 12:11

  11. Christian Kuhn merged patch set 3 12/09/24, 12:21