Cleaning the Heroku Cache

2013-03-18 / All Blog posts

In an earlier post, I talked about using a bash console to experiment with a Heroku app. I mentioned that you should not run sbt. Of course, that is exactly what I did, and I discovered the hard way that the cache can't be cleared from the heroku bash shell. The build cache is held outside the dyno and cannot be accessed from inside a running dyno.

Cleaning the cache is accomplished with a special cache cleaner buildpack. Set the buildpack in your app like this:
heroku config:add BUILDPACK_URL= --app myapp

Push your code:

git push heroku master

Remove the cache cleaner buildpack:

heroku config:remove BUILDPACK_URL --app myapp

Change a file, commit and push again:

git push heroku master

All better!

comments powered by Disqus