Cachetool remove caches from CLI


curl -sO
chmod +x cachetool.phar

When it’s installed the fun starts

Just find the php-fpm socket and generate our command.

ls /var/run

/usr/bin/php /root/cachetool/cachetool.phar opcache:reset --fcgi=/var/run/phpfpm.sock

More commands:

apc:bin:dump Get a binary dump of files and user variables
apc:bin:load Load a binary dump into the APC file and user variables
apc:cache:clear Clears APC cache (user, system or all)
apc:cache:info Shows APC user & system cache information
apc:cache:info:file Shows APC file cache information
apc:key:delete Deletes an APC key
apc:key:exists Checks if an APC key exists
apc:key:fetch Shows the content of an APC key
apc:key:store Store an APC key with given value
apc:sma:info Show APC shared memory allocation information
apcu:cache:clear Clears APCu cache
apcu:cache:info Shows APCu user & system cache information
apcu:cache:info:keys Shows APCu keys cache information
apcu:key:delete Deletes an APCu key
apcu:key:exists Checks if an APCu key exists
apcu:key:fetch Shows the content of an APCu key
apcu:key:store Store an APCu key with given value
apcu:regexp:delete Deletes all APCu key matching a regexp
apcu:sma:info Show APCu shared memory allocation information
opcache:configuration Get configuration information about the cache
opcache:reset Resets the contents of the opcode cache
opcache:status Show summary information about the opcode cache
opcache:status:scripts Show scripts in the opcode cache
stat:clear Clears the file status cache, including the realpath cache
stat:realpath_get Show summary information of realpath cache entries
stat:realpath_size Display size of realpath cache


Computer says you need 2 min. to read