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
The following should work on cedar:
heroku run console
..then wait 5 seconds for heroku console to boot
Rails.cache.clear
Then you should see the cache clear, and you can quit console. Remember you might have to refresh a few times because your local machine will often cache assets and such in your browser until it makes a fresh request.
If it happens to be assets that you're caching though, you don't need to go through a manual clear every time you push, you just need to have the asset pipeline set up and make sure all your js/css(less/sass)/static images are being compiled with hashes at the end of their filenames.