You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
When the clearCachePostProc() in the DataHandlerHook is called, it always writes 2 entries to the $cacheTagsToFlush array. It then loops through the array and executes $cacheManager->flushCachesInGroupByTag(). Because the class is a singleton, the $cacheTagsToFlush array is never deleted. This means that when another news item is deleted, the cache for all previous items is emptied again.
With 115 deleted news elements, that are on the same page, the $cacheManager->flushCachesInGroupByTag() call occurs over 6600 times.
Expected behavior/output
The $cacheManager->flushCachesInGroupByTag() should just be called once per item and page.
Environment
TYPO3 version(s): [11, 12]
news version: [10.0.3, 11.4.2]
Is your TYPO3 installation set up with Composer (Composer Mode): [yes]
Possible Solution
There are different ways to solve this. The fastest solution could be to reset the $cacheTagsToFlush array on each hook call, but this would still trigger multiple calls for the same page. The cleanest approach would probably be to collect alle $cacheTagsToFlush in an earlier hook and to clear it in the clearCachePostProc() Hook.
The text was updated successfully, but these errors were encountered:
Bug Report
Current Behavior
When the clearCachePostProc() in the DataHandlerHook is called, it always writes 2 entries to the $cacheTagsToFlush array. It then loops through the array and executes $cacheManager->flushCachesInGroupByTag(). Because the class is a singleton, the $cacheTagsToFlush array is never deleted. This means that when another news item is deleted, the cache for all previous items is emptied again.
With 115 deleted news elements, that are on the same page, the $cacheManager->flushCachesInGroupByTag() call occurs over 6600 times.
Expected behavior/output
The $cacheManager->flushCachesInGroupByTag() should just be called once per item and page.
Environment
Possible Solution
There are different ways to solve this. The fastest solution could be to reset the $cacheTagsToFlush array on each hook call, but this would still trigger multiple calls for the same page. The cleanest approach would probably be to collect alle $cacheTagsToFlush in an earlier hook and to clear it in the clearCachePostProc() Hook.
The text was updated successfully, but these errors were encountered: