@gilesbutler, Netlify stores certain files in /opt/build/cache
and reloads them each build to prevent downloading files more than once if we have copies already.
Note, the build runs in /opt/build/repo
by default. Below is a copy of the command ls -alh ../cache
which was run during a build of one of my Netlify sites:
11:59:11 PM: drwxr-xr-x 18 buildbot root 4.0K Dec 2 07:58 .
11:59:11 PM: drwxr-xr-x 4 buildbot root 4.0K Dec 2 07:58 ..
11:59:11 PM: drwxr-xr-x 3 buildbot nogroup 4.0K Nov 22 20:20 .boot
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 bower_components
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 .bundle
11:59:11 PM: drwx------ 3 buildbot nogroup 4.0K Nov 22 20:19 .cache
11:59:11 PM: drwxr-xr-x 9 buildbot nogroup 4.0K Nov 22 20:20 .cask
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 .composer
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 .emacs.d
11:59:11 PM: drwxr-xr-x 3 buildbot nogroup 4.0K Oct 30 06:41 hugo_cache
11:59:11 PM: drwxr-xr-x 3 buildbot nogroup 4.0K Nov 22 20:20 .m2
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 node_modules
11:59:11 PM: drwxr-xr-x 4 buildbot nogroup 4.0K Oct 30 06:41 node_version
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Dec 2 07:58 ruby_version
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 .venv
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 wapm_packages
11:59:11 PM: drwxr-xr-x 3 buildbot nogroup 4.0K Oct 30 06:41 .wasmer
11:59:11 PM: drwxr-xr-x 2 buildbot nogroup 4.0K Oct 30 06:41 .yarn_cache
Hopefully, this gives an overview of where to find the Netlify build cache and the types of files/directories which are stored there. To summarize, this cache located at ../cache
relative to the base of the cloned repo (which is the default build directory).
Please let us know if there are other questions about this.