10156[BUGFIX] Page cache expiry calculation fails
Commit message
Review
-
Code review CR +2
- Francois Suter +2
- Wouter Wolters +1
- Xavier Perseguers +1
- Jigal van Hemert +1
- Philipp Gampe +1
-
Verified V +2
- Francois Suter +2
- Jigal van Hemert +1
Files 1
Review log 12
-
Francois Suter commented on patch set 1 05/09/12, 08:04
Thanks for all the reviews. I'll commit that tomorrow (probably). -
Francois Suter commented on patch set 1 V 0 05/09/12, 08:04
by team member; Looks good to me, approved -
Francois Suter commented on patch set 1 05/09/12, 08:04
Jigal: yes, there are now 2 queries instead of one. The condition on the time field is still there, but both time fields are queries separately. Xavier: a single query is what the current version does and is exactly the reason why it breaks. I tried hard not to add an extra query, but I don't think that it can be avoided. Consider the following very simple situation with 2 dummy records: +---+-----------+-----------+ | uid | starttime | endtime | +---+-----------+-----------+ | 1 | 1436057249 | 0 | +---+-----------+-----------+ | 2 | 0 | 1536057249 | +---+-----------+-----------+ In this case we need to consider both records, because #1 has a starttime in the future and #2 has an endtime in the future. But that means that we also get #1's endtime and #2's starttime, which are zero and are going to "corrupt" our minimum for each field by setting it to zero. This is exactly what fails with the current code. Does that make more sense? -
Francois Suter commented on patch set 1 05/09/12, 08:04
The formatting of my little table got lost. I guess you should be able to understand the example anyway. -
Xavier Perseguers commented on patch set 1 05/09/12, 08:04
Looks good to me, but someone else must approveclass.tslib_fe.php:4930To go with Jigal's suggestion, what about returning both MIN of starttime and endtime with a single operation?class.tslib_fe.php:4931other field to be added here as wellclass.tslib_fe.php:4939will stay identical with 3 arguments instead of 2 -
Xavier Perseguers commented on patch set 1 05/09/12, 08:04
(3 inline comments) -
Jigal van Hemert commented on patch set 1 05/09/12, 08:04
If I understand the patch correctly there are two things changed: 1. the filter for all time fields > now is removed (correct, because cache lifetime should also be affected by endtime > now and starttime < now) 2. there are now two queries per table instead of one Is this correct? -
Jigal van Hemert commented on patch set 1 05/09/12, 08:04
Verified; Looks good to me, but someone else must approve -
Philipp Gampe commented on patch set 1 05/09/12, 08:04
Looks good to me, but someone else must approve -
Mr. Jenkins commented on patch set 1 05/09/12, 08:04
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3713/ : SUCCESS -
Wouter Wolters commented on patch set 1 05/09/12, 08:04
Looks good to me, but someone else must approve -
Francois Suter merged patch set 1 05/09/12, 08:04