Last active
December 9, 2021 16:55
-
-
Save jonaseberle/9bfc29b3af726c41b3cd9cec088fc722 to your computer and use it in GitHub Desktop.
use gordalina/cachetool in typo3/surf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# composer req gordalina/cachetool | |
# example for using it via HTTP if php-fpm not accessible (use --fcgi[=/run/...|=127.0.0.1:9000] if you can) | |
$deployment | |
->defineTask( | |
'CachetoolTask', | |
ShellTask::class, | |
[ | |
'command' => [ | |
'export cacheToolParams="--web=SymfonyHttpClient --web-allow-insecure --web-url=' | |
. escapeshellarg($application->getOption('baseUrl')) . ' --web-path=./public/ --web-host"', | |
'cd {releasePath}', | |
'eval vendor/bin/cachetool apcu:cache:clear $cacheToolParams', | |
'eval vendor/bin/cachetool opcache:reset $cacheToolParams', | |
'eval vendor/bin/cachetool stat:clear $cacheToolParams', // to my knowledge this will only clear for the current PHP process?! | |
'eval vendor/bin/cachetool stat:clear --cli', | |
], | |
'logOutput' => true, | |
'ignoreErrors' => false, | |
] | |
) | |
->beforeTask( // stage "switch" | |
FlushCachesTask::class, | |
'CachetoolTask' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment