dmk / mkcache_queue
Clear the TYPO3 caches via a queue instead of doing it directly
Installs: 956
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- php: ^7.4 || ^8.0 || ^8.1 || ^8.2
- typo3/cms-core: ^11.5.7 || ^12.4
Requires (Dev)
- captainhook/captainhook: ^5.14
- friendsofphp/php-cs-fixer: ^3.3
- mikey179/vfsstream: ^1.6
- php-parallel-lint/php-parallel-lint: ^1.3
- phpcompatibility/php-compatibility: ^10@dev
- phpmd/phpmd: ^2.13
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.9
- saschaegerer/phpstan-typo3: ^1.8
- sebastian/phpcpd: ^6.0
- typo3/testing-framework: ^6.16 || ^7.0 || ^8.0
This package is auto-updated.
Last update: 2024-11-19 10:02:34 UTC
README
"MK Cache Queue" provides a queue for clearing the caches of TYPO3. So instead of clearing the caches directly, this is done asynchronously via a scheduler job (command cache:process-queue). This will reduce the frequency of cache clearing when editors do a lot of work. How often the caches will be cleared depends only on the frequency of the scheduler job.
By default it's still possible to clear the cache directly. This is possible through the CLI command cache:flush, the clear all caches button in the BE (top bar) and the different buttons to clear the caches of a page (Page view, context menu in page tree). So basically all cache clears which are triggered directly by a user will still clear the cache. Actions like saving a content element will clear the caches in the background and those clears are put into a queue. You can turn off this behaivour and forbid direct cache clearing completely through the extension configuration disableDirectCacheClearCompletely.
Furthermore you can configure the supported caches via the extension configuration cachesToClearThroughQueue. Or you can use the API function DMK\MkcacheQueue\Utility\Registry::registerCacheToClearThroughQueue() to add caches to clear through queue in your own extensions or the AdditionalConfiguration.php
Installation
- Require/install extension
composer require dmk/mkcache_queue:^12.0
- create a scheduler task for executing a console command and select the cache:process-queue command.
- make sure the cronjob for executing the scheduler tasks of TYPO3 is in place
- add your caches to clear through queue in the extension configuration or via the API function
- default caches to clear through queue: core, extbase, hash, imagesizes, l10n, dashboard_rss, fluid_template, assets, pages, pagesection, rootline
- decide if you want to turn off direct cache clearing completely via extension configuration disableDirectCacheClearCompletely (default: false)