Flow caches store build dependencies for each task in a separate directory. This accelerates future builds because the cache can be downloaded quickly. These settings apply only to Linux container build environments. For Windows VM build environments, you must configure the cache manually.
Example
cache:
cacheDirs:
- /root/.m2 # Cache directory
- /root/.gradle/caches
- /root/.npm
- /root/.yarn
- /go/pkg/mod
- /root/.cache
cacheMode: remote # remote: Use for public or private clusters. local: Use for private clusters only.
Details
cache
Specifies the cache configuration.
cache[].cacheDirs
Required. Specifies the cache directories. You can specify one or more directories.
cache[].cacheMode
Required. Specifies the cache mode. Valid values are `remote` and `local`. Public build clusters support only the `remote` mode. Private build clusters support both `local` and `remote` modes.
该文章对您有帮助吗?