Skip to content

Commit 50b81b6

Browse files
committed
docs(en): fix conflicts
1 parent 3e88ddd commit 50b81b6

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/content/configuration/cache.mdx

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -441,35 +441,33 @@ module.exports = {
441441
};
442442
```
443443

444-
<<<<<<< HEAD
445444
W> 在具有不同选项的调用之间不要共享缓存。
446-
=======
447-
W> Don't share the cache between calls with different options.
448445

449-
## Setup cache in CI/CD system
446+
## CI/CD 系统中设置缓存 $#setup-cache-in-cicd-system$
450447

448+
文件系统缓存允许在 CI 的构建之间共享缓存。为了设置设置缓存:
451449
Filesystem cache allows to share cache between builds in CI. To setup cache:
452450

453-
- CI should have an option to share cache between builds.
454-
- CI should run job in the same absolute path. This is important since webpack cache files store absolute paths.
451+
- CI 应该有一个在构建之间共享缓存的配置项。
452+
- CI 应该在相同的绝对路径中运行任务。这非常重要,因为 webpack 缓存文件存储绝对路径。
455453

456454
### GitLab CI/CD
457455

458-
Common config could looks like
456+
以下是一些通用配置
459457

460458
```yaml
461459
variables:
462-
# fallback to use "main" branch cache, requires GitLab Runner 13.4
460+
# 兜底使用 "main" 分支缓存,要求 GitLab Runner 版本为 13.4
463461
CACHE_FALLBACK_KEY: main
464462

465-
# this is webpack build job
463+
# 这是 webpack 构建任务
466464
build-job:
467465
cache:
468-
key: '$CI_COMMIT_REF_SLUG' # branch/tag name
466+
key: '$CI_COMMIT_REF_SLUG' # 分支/tag 名称
469467
paths:
470-
# cache directory
471-
# make sure that you don't run "npm ci" in this job or change default cache directory
472-
# otherwise "npm ci" will prune cache files
468+
# 缓存文件夹
469+
# 确保在这个任务中没有运行 "npm ci" 或者更改默认缓存文件夹
470+
# 否则 "npm ci" 将会删除缓存文件
473471
- node_modules/.cache/webpack/
474472
```
475473
@@ -478,11 +476,10 @@ build-job:
478476
```yaml
479477
- uses: actions/cache@v3
480478
with:
481-
# cache directory
479+
# 缓存文件夹
482480
path: node_modules/.cache/webpack/
483481
key: ${{ GITHUB_REF_NAME }}-webpack-build
484-
# fallback to use "main" branch cache
482+
# 兜底使用 "main" 分支缓存
485483
restore-keys: |
486484
main-webpack-build
487485
```
488-
>>>>>>> f61d17e8b8c5013d651e6c5e7e4d008fd374ec26

0 commit comments

Comments
 (0)