I applied cache to my heroku rails app and it works well. But everytime I deploy to heroku, I also want to clear cache automatically.
so I googled and I found this
You should be able to create a cache clearing rake task that looks something like this:
namespace :cache do
desc "Clears Rails cache"
task :clear => :environment do
Rails.cache.clear
end
end
and invoke it directly in one command that you can use in your post deploy hook - like so:
heroku run rake cache:clear