Skip to content

Commit

Permalink
docs: add persistent cache invalidation notes (#8921)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykingxyz authored Jan 7, 2025
1 parent c1a29f4 commit 0237d92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions website/docs/en/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,15 @@ module.exports = {

Cache versions, different versions of caches are isolated from each other.

:::tip title="Persistent cache invalidation"

In addition to [buildDependencies](#cachebuilddependencies) and [version](#cacheversion) configurations that affect persistent cache invalidation, Rspack also invalidates persistent cache when the following fields change.

- [config.name](/config/other-options#name)
- [config.mode](/config/mode#mode)

:::

#### cache.snapshot

Configure snapshot strategy. Snapshot is used to determine which files have been modified during shutdown. The following configurations are supported:
Expand Down
9 changes: 9 additions & 0 deletions website/docs/zh/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,15 @@ module.exports = {

缓存数据的版本,不同版本缓存相互隔离。

:::tip title="持久化缓存失效"

除了 [buildDependencies](#cachebuilddependencies)[version](#cacheversion) 配置会影响持久化缓存失效,Rspack 还会在以下字段变化时使持久化缓存失效。

- [config.name](/config/other-options#name)
- [config.mode](/config/mode#mode)

:::

#### cache.snapshot

配置快照策略,Snapshot 用于在热启动时判断哪些文件在停机时被修改。支持以下配置:
Expand Down

0 comments on commit 0237d92

Please sign in to comment.