Providers should be able to specify what files are necessary for the install step to allow for better Docker layer caching.
For example, the NPM provider could specify that package.json is all that is necessary to install. If that files does not change between deploys, a cached layer can be used.
Provider caching can be split up into a few different types
- Specify the files necessary to install so that only these files are keyed against when computing a cache hit/miss
- App/framework level caches (e.g.
.next directory). These caches should be re-used even if the source code that generated the cache changes. For this level of caching we cannot take advantage of built in Docker layer caching and will likely require a persistent volume that can be shared between builds.
This RFC will mainly focus on the first type.
Providers should be able to specify what files are necessary for the install step to allow for better Docker layer caching.
For example, the NPM provider could specify that
package.jsonis all that is necessary to install. If that files does not change between deploys, a cached layer can be used.Provider caching can be split up into a few different types
.nextdirectory). These caches should be re-used even if the source code that generated the cache changes. For this level of caching we cannot take advantage of built in Docker layer caching and will likely require a persistent volume that can be shared between builds.This RFC will mainly focus on the first type.