Skip to content

Commit a699214

Browse files
AidanDelaneyjkutner
andcommitted
Update content/docs/buildpack-author-guide/caching-strategies.md
Co-authored-by: Joe Kutner <[email protected]> Signed-off-by: Aidan Delaney <[email protected]>
1 parent 7f8725d commit a699214

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/buildpack-author-guide/caching-strategies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Setting `Build = true` makes a layer available to subsequent buildpacks. Theref
5050

5151
Setting `Cache = true` allows additional fine-grained control over caching. The `Cache = true` flag caches a layer and allows a buildpack to make _content_ level decisions about the validity of the cache (as opposed to using the less granular metadata). As an example, suppose a layer where `Launch = true` installs a `jq` binary with version `1.5` and sets `version=1.5` in the layer metadata. By default, this layer will not be re-used from the registry when a buildpack requests `jq` with `version=1.6` to be installed. However, setting `Cache = true` makes a previously built layer available during the build. A buildpack could then prefer to implement logic to restore `jq` with `version=1.5` instead of performing a potentially expensive download of `jq` with `version=1.6`. The `Cache = true` setting allows for cache validation decisions to be made at a level of granularity that is much finer grained than layer metadata.
5252

53-
Setting `Cache = false, Build = false, Launch = true` is the most common configuration. If `Cache = false, Build = false, Launch = true` is not appropriate for your layer, then `Cache = true, Build = true, Launch = true` should be the next combination to evaluate:
53+
Setting `Cache = false`, `Build = false`, and `Launch = true` is the most common configuration. If `Cache = false`, `Build = false`, and `Launch = true` is not appropriate for your layer, then `Cache = true`, `Build = true`, and `Launch = true` should be the next combination to evaluate:
5454

5555
* When `Cache = true, Build = true, Launch = true`, explicitly setting `Build = true` makes the layer available, to subsequent buildpacks, during the build phase. As `Cache = true` the layer is restored from local cache before proceeding to the build phase. For example, a Python distribution could be provided in a cached, build and launch layer. The build phase could verify that the restored cached version of the Python distribution contains Python 3.10 but disregard the patch number of the Python interpreter.
5656
* `Cache = true, Build = true, Launch = true` is an appropriate setting for a layer providing a distribution or runtime such as a Python interpreter or NodeJS runtime.

0 commit comments

Comments
 (0)