Bug #58008
Feature #39430: Update cache framework to latest FLOW3 version
Autoload cache never expires and is not flushed after installing new extension
Status: | Closed | Start date: | 2014-04-17 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Caching | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 4.7 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: |
Description
Since https://review.typo3.org/24073 installing new extensions may lead to fatal PHP errors if new classes are added which rely on the autoloader.
The handling of NULL and 0 values for lifetime fails because $GLOBALS['EXEC_TIME'] is not set yet when the autoloader is invoked.
The expiry time for NULL lifetime values is set to the default lifetime (3600) plus EXEC_TIME (0).
When checking if a cache entry is valid or not, a check is done if expiry time in cache entry != 0 and < EXEC_TIME. Since EXEC_TIME is zero this will never fail.
Same problem in flushByTag() which first finds the cache entries with a similar check. The result is that these autoload cache files are not removed.
To make the feature work EXEC_TIME must be set before activating the caches and autoloader. For testing I copied it to the top of config_default.php and the right expiry times appear in the cache entries. Installing an extension with new classes now works without fatal errors.
Related issues
History
#1 Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_4-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29572
#2 Updated by Wouter Wolters 9 months ago
- Status changed from Under Review to Closed
Won't fix anymore. 4.7 is End Of Life.