Skip to content
kmayer edited this page Mar 19, 2012 · 1 revision

Here's another handy snippet for clearing your Rails cache after deployments.

namespace :cache do
  task :clear => :environment do
    Rails.cache.clear
  end
end

task :after_deploy do
  each_heroku_app do |stage|
    stage.run 'rake', 'cache:clear'
  end
end
Clone this wiki locally