diff --git a/content/doc/reference/reference-environment-variables.md b/content/doc/reference/reference-environment-variables.md index 597ecf053..3009a97cf 100644 --- a/content/doc/reference/reference-environment-variables.md +++ b/content/doc/reference/reference-environment-variables.md @@ -63,6 +63,7 @@ You can set some tools' version in any runtime (except Docker): | Name | Description | Default value | |-----------------------|------------------------------|--------------------------------| |`CC_CACHE_DEPENDENCIES` | Enable caching of your build dependencies to speed up following builds. | false | +|`CC_CACHE_DEPENDENCIES_EXTRA_PATHS` | Adds additional paths to dependencies cache, relative to the application folder, separated by a `:` (e.g. `vendor:../dependencies`) | | |[`CC_DISABLE_BUILD_CACHE_UPLOAD`](../../develop/env-variables/#settings-you-can-define-using-environment-variables "Settings you can define using environment variables") | Disable creation and upload of cache archive. Restarts won't be speeded up. | `false` | |[`CC_IGNORE_FROM_BUILDCACHE`](../../develop/env-variables/#settings-you-can-define-using-environment-variables "Settings you can define using environment variables") | Allows to specify paths to ignore when the build cache archive is created. | | |[`IGNORE_FROM_BUILDCACHE`](../../develop/env-variables/#settings-you-can-define-using-environment-variables "Settings you can define using environment variables") | (Deprecated) Allows to specify paths to ignore when the build cache archive is created. | | diff --git a/shared/cached-dependencies.md b/shared/cached-dependencies.md index 4477905f9..b94ff4e5b 100644 --- a/shared/cached-dependencies.md +++ b/shared/cached-dependencies.md @@ -2,7 +2,13 @@ #### Enabling dependencies caching -You can enable dependencies caching by adding the `CC_CACHE_DEPENDENCIES=true` [environment variable](#setting-up-environment-variables-on-clever-cloud) in your application. It is enabled by default only for rust and haskell applications. +You can enable dependencies caching by adding the `CC_CACHE_DEPENDENCIES=true` [environment variable](#setting-up-environment-variables-on-clever-cloud) in your application. It's enabled by default only for Haskell and Rust applications. + +To add folders to the dependencies cache, use `CC_CACHE_DEPENDENCIES_EXTRA_PATHS`. These paths should comply with the following rules: +- Be a subdirectory of the `$HOME` directory, but not the whole `$HOME` directory +- Be a sibling or a child of the whole `$APP_HOME` directory, but not the whole `$APP_HOME` directory +- Be relative to the application root directory (e.g. `vendor`, `../dependencies`) +- Be separated by a `:` if you want to add multiple paths (e.g. `CC_CACHE_DEPENDENCIES_EXTRA_PATHS=vendor:../dependencies`) #### Disabling dependencies caching