Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I flush the Heroku buildpack CACHE_DIR?

Tags:

During development of our Python/Django application, we accidentally introduced package requirements in requirements.txt that installed conflicting versions of a library. Heroku has cached the broken requirements in the CACHE_DIR specified by the python buildpack, as documented on their buildpack API info page, and it doesn't seem that any amount of modification to the requirements.txt file can purge the cache of the broken packages. How can we force Heroku to totally empty out the CACHE_DIR and reinstall all requirements and dependencies from scratch?

like image 377
Andrew Gorcester Avatar asked Jan 16 '13 21:01

Andrew Gorcester


People also ask

How do I clear cache on Heroku?

Anyways, you can clear the build cache of an app easily by installing heroku-builds plugin. Note: The cache will be rebuilt on the next deployment. If you do not have any new code to deploy, you can push an empty commit.

How do I clear a build cache?

Builds are cached by branch. If you want to manually clear the cache and trigger a new build you can do so by clicking on the Trigger build dropdown button and selecting the Clear cache and build option.

Does heroku cache?

Heroku doesn't provide HTTP caching by default. In order to take advantage of HTTP caching, you'll need to configure your application to set the appropriate HTTP cache control headers and use a content delivery network (CDN) or other external caching service.


1 Answers

Use heroku-repo plugin purge_cache command:

$ heroku plugins:install heroku-repo $ heroku repo:purge_cache -a appname 
like image 181
zakjan Avatar answered Sep 22 '22 15:09

zakjan