mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 01:02:24 +01:00
2.2 KiB
2.2 KiB
cachetool
Add to your deploy.php
require 'contrib/cachetool.php';
Configuration
-
cachetool (optional): accepts a string with the unix socket or ip address to php5-fpm. If
cachetool
is not given, then the application will look for acachetool.yml
file and read the configuration from there.set('cachetool', '/var/run/php5-fpm.sock'); // or set('cachetool', '127.0.0.1:9000');
You can also specify different cachetool settings for each host:
host('staging')
->set('cachetool', '127.0.0.1:9000');
host('production')
->set('cachetool', '/var/run/php5-fpm.sock');
By default, if no cachetool
parameter is provided, this recipe will fallback to the global setting.
Usage
Since APC/APCu and OPcache deal with compiling and caching files, they should be executed right after the symlink is created for the new release:
after('deploy:symlink', 'cachetool:clear:opcache');
or
after('deploy:symlink', 'cachetool:clear:apc');
or
after('deploy:symlink', 'cachetool:clear:apcu');
Read more
Read more information about cachetool on the website: http://gordalina.github.io/cachetool/
- Config
- Tasks
cachetool:clear:apc
— Clearing APC system cachecachetool:clear:opcache
— Clearing OPcode cachecachetool:clear:apcu
— Clearing APCu system cache
Config
cachetool
cachetool_args
cachetool_binary
cachetool_options
Tasks
cachetool:clear:apc
cachetool:clear:opcache
Clear opcache cache
cachetool:clear:apcu
Clear APCU cache