Skip to content
代码片段 群组 项目
提交 1b1e8f3e 编辑于 作者: Fiona Neill's avatar Fiona Neill
浏览文件

Merge branch 'pedropombeiro/330047/cache-docs-improvement' into 'master'

Fix release milestone on caching documentation

See merge request gitlab-org/gitlab!86421
No related branches found
No related tags found
无相关合并请求
...@@ -447,13 +447,11 @@ is stored on the machine where GitLab Runner is installed. The location also dep ...@@ -447,13 +447,11 @@ is stored on the machine where GitLab Runner is installed. The location also dep
If you use cache and artifacts to store the same path in your jobs, the cache might If you use cache and artifacts to store the same path in your jobs, the cache might
be overwritten because caches are restored before artifacts. be overwritten because caches are restored before artifacts.
### Segregation of caches between protected and non-protected branches #### Cache key names
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330047) in GitLab 14.10. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330047) in GitLab 15.0.
A suffix is added to the cache key, with the exception of the [fallback cache key](#use-a-fallback-cache-key). A suffix is added to the cache key, with the exception of the [fallback cache key](#use-a-fallback-cache-key).
This is done in order to prevent cache poisoning that might occur through manipulation of the cache in a non-protected
branch. Any subsequent protected-branch jobs would then potentially use a poisoned cache from the preceding job.
As an example, assuming that `cache.key` is set to `$CI_COMMIT_REF_SLUG`, and that we have two branches `main` As an example, assuming that `cache.key` is set to `$CI_COMMIT_REF_SLUG`, and that we have two branches `main`
and `feature`, then the following table represents the resulting cache keys: and `feature`, then the following table represents the resulting cache keys:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册