[BUGFIX] Remove expired cache_treelist entries during runtime 31/59031/2
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Mon, 26 Nov 2018 09:58:48 +0000 (10:58 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 4 Dec 2018 19:28:05 +0000 (20:28 +0100)
commit7e83f87f668ac06a112ea6e19d74a6d825c0553e
treeb37b5f546d0bcc675c7914c1237b3f90f53e9f8b
parentb6122653137857310820c0d94205c34a5719af1e
[BUGFIX] Remove expired cache_treelist entries during runtime

When \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList
checked for an existing cache_treelist entry, the given md5hash and the
expiry timestamp had been compared. As caches do not expire at all by
default, there a very few cases when an entry is actually expired.

However, if a cache entry has been expired, the cache entry hasn't been
removed and therefore the creation of a new cache entry with the same
md5hash identifier resulted in a duplicate entry exception.

To solve this, the affected, expired entry will be removed during runtime.

Releases: master, 8.7
Resolves: #86028
Resolves: #86491
Change-Id: If1a907607db29f7edd0fa77a8bb47a69bdfc0df9
Reviewed-on: https://review.typo3.org/59031
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php