Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

devforce/heroku-buildpack-cacheload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

heroku-buildpack-cacheload

Copy files from cache. Paths are read from .buildcache file in your project source code.

You should use this, if your project is pulling a lot of dependencies during each build. If you store them into cache and during build you just check if they haven't changed, your build time will reduce dramatically.

Heroku's buildpacks have ways to cache things already, but they're done fairly inconsistently, and sometimes the built in ways don't do enough, specifically with ruby dealing with webpacker in the assets:precompile step heroku/heroku-buildpack-ruby#892 (comment)

Usage example

Set buildpacks so that cacheload is first, then ends with cachesave and cacheclean

https://github.com/devforce/heroku-buildpack-cacheload
heroku/ruby
heroku/pgbouncer
https://github.com/devforce/heroku-buildpack-cachesave
https://github.com/devforce/heroku-buildpack-cacheclean

Then specify the directories you want to cache between builds

.buildcache:

~/.cache/yarn
code/server/node_modules
code/client/node_modules
code/client/bower_components

Troubleshooting

How to clear the cache?

Use heroku-repo plugin.

$ heroku plugins:install https://github.com/heroku/heroku-repo.git
$ heroku repo:purge_cache -a appname

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •