I’m trying to simplify my deploy process and am making use of the Capistrano tool. Is there a way to have capistrano flush W3TC’s cache in a deploy task?
Leave a Reply
You must be logged in to post a comment.
I’m trying to simplify my deploy process and am making use of the Capistrano tool. Is there a way to have capistrano flush W3TC’s cache in a deploy task?
You must be logged in to post a comment.
As @andreascreten, wp-cli will do the job for you.
wp-cli includes commands for W3TC (located in the
src/php/wp-cli/commands/community/total-cache.php
file), so you can flush the cache by running:Where
<type>
is one of ‘db’, ‘minify’, ‘object’, ‘page’ or ‘post’.(Note: If you use ‘post’, you’ll need to pass in
--post_id=
or--permalink=
as well)You could use wp-cli to flush W3TC: https://github.com/wp-cli/wp-cli.