[BUGFIX] Flush all cache tags in bulk when deleting records
This patch makes the TYPO3 DB cache backend capable of flushing tags using an array of tag names that is then turned into a CSV list and used in an `IN` query. It limits the number of cache flushes from $numRecords to ceil($numRecords/100). NB: the desired behavior is introduced by reviving the flushByTags() method as API for cache frontends and backends. The method was previously present but was dropped in order to keep sync with Flow - which then later added the method exactly because of performance concerns. TYPO3 however did not revive this method and obviously the sync with Flow is no longer a concern. So this patch restores the full API required to flush tags in bulk, adds an implementation for the TYPO3 DB cache backend and adds delegation to the old flushByTag method for backends not covered by this patch. It will be possible to improve other backends as well but this patch focuses exclusively on the DB cache backend for *NIX, which is...
Showing
- typo3/sysext/core/Classes/Cache/Backend/AbstractBackend.php 16 additions, 0 deletionstypo3/sysext/core/Classes/Cache/Backend/AbstractBackend.php
- typo3/sysext/core/Classes/Cache/Backend/TaggableBackendInterface.php 9 additions, 0 deletions...t/core/Classes/Cache/Backend/TaggableBackendInterface.php
- typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php 73 additions, 3 deletions...ysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php
- typo3/sysext/core/Classes/Cache/CacheManager.php 57 additions, 15 deletionstypo3/sysext/core/Classes/Cache/CacheManager.php
- typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php 29 additions, 2 deletions...3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php
- typo3/sysext/core/Classes/Cache/Frontend/FrontendInterface.php 9 additions, 0 deletions.../sysext/core/Classes/Cache/Frontend/FrontendInterface.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 2 additions, 6 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/ApcBackendTest.php 16 additions, 0 deletions...3/sysext/core/Tests/Unit/Cache/Backend/ApcBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/ApcuBackendTest.php 16 additions, 0 deletions.../sysext/core/Tests/Unit/Cache/Backend/ApcuBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/MemcachedBackendTest.php 16 additions, 0 deletions...xt/core/Tests/Unit/Cache/Backend/MemcachedBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/PdoBackendTest.php 16 additions, 0 deletions...3/sysext/core/Tests/Unit/Cache/Backend/PdoBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/RedisBackendTest.php 22 additions, 0 deletions...sysext/core/Tests/Unit/Cache/Backend/RedisBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/TransientMemoryBackendTest.php 18 additions, 0 deletions...e/Tests/Unit/Cache/Backend/TransientMemoryBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/Typo3DatabaseBackendTest.php 55 additions, 1 deletion...ore/Tests/Unit/Cache/Backend/Typo3DatabaseBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/Backend/WincacheBackendTest.php 16 additions, 0 deletions...ext/core/Tests/Unit/Cache/Backend/WincacheBackendTest.php
- typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php 22 additions, 0 deletionstypo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php
- typo3/sysext/core/Tests/Unit/Cache/Fixtures/FrontendFixture.php 4 additions, 0 deletions...sysext/core/Tests/Unit/Cache/Fixtures/FrontendFixture.php
- typo3/sysext/core/Tests/Unit/Cache/Frontend/AbstractFrontendTest.php 20 additions, 1 deletion...t/core/Tests/Unit/Cache/Frontend/AbstractFrontendTest.php
- typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php 21 additions, 1 deletion...3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
- typo3/sysext/extbase/Classes/Service/CacheService.php 4 additions, 3 deletionstypo3/sysext/extbase/Classes/Service/CacheService.php
Please register or sign in to comment