#86028getTreeList inserts duplicate keys in cache_treelist
Description
In my installation the getTreeList() function from TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer tries to insert a duplicate entry into cache_treelist.
I think this is possible on large sites with many getTreeList usage.
I think it will help to encapsulate the following block (line 6978-6986) into a try/catch construct:
GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('cache_treelist')->insert(
'cache_treelist',
[
'md5hash' => $requestHash,
'pid' => $id,
'treelist' => implode(',', $theList),
'tstamp' => $GLOBALS['EXEC_TIME']
]
);
If it fails inserting, there is an entry inserted just microseconds before, so we can ignore that.
The problem occures every 2-3 days.