capcake icon indicating copy to clipboard operation
capcake copied to clipboard

[v3] Clear cache

Open chadrien opened this issue 10 years ago • 2 comments

Capcake should hook somewhere (before deploy:publishing?) to clear cache

namespace :deploy do
  before publishing, :clear_cache do
    on roles(:app) do
      within release_path do
        execute :rm, '-rf', 'tmp/cache/**/*'
      end
    end
  end
end

chadrien avatar Feb 24 '15 15:02 chadrien

@chadrien good idea! Can you submit a PR?

jadb avatar Feb 24 '15 15:02 jadb

It might not be necessary to have a task for this. As of CakePHP v3.3.0 clearing the cache can be accomplished out of the box with capcake by running:

bundle exec cap production cakephp:cake[cache,clear_all]

chronon avatar Aug 28 '16 20:08 chronon