Search code examples
netlify

Cache individual files between netlify deploys to speed up subsequent builds


All I found in the docs for this topic was related to dependency caching (https://www.netlify.com/docs/continuous-deployment/#dependency-cache). But I want to cache individual output files from my builds (Makefile based) to speedup subsequent deployments by avoiding the rebuild of unchanged files.

Any ideas on how to manage this? Thank you so much in advance.


Solution

  • Netlify automatically caches public files on the CDN so they don’t have to be re-uploaded if their paths and SHAs don’t change, but this won't happen in your build environment unless you are on an enterprise plan. If your build is so extensive that this would be a savings of multiple minutes, feel free to write into support to see if there are better settings to use in your particular case, but chances are, there aren't.