Skip to content

[Bug]: Cache timestamp changes lead to invalidation? #9064

@cskunkun

Description

@cskunkun

System Info

macos,linux也是如此

Details

使用缓存构建

tools: {
  rspack: {
    cache: true,
    experiments: {
      cache: { type: 'persistent' },
    },
  },
}

把node_modules下的.cache/rspack压缩一遍,把原文件夹删掉,再解压获得一个文件夹,会导致缓存验证失败,理论上缓存没有变化。
⚠ validate scope occasion_make_dependencies failed due to some packs are modified。

是否是因为timestamp变化导致缓存验证失败,如何解决?

Reproduce link

No response

Reproduce Steps

  1. 使用缓存构建
  2. 把缓存文件压缩一遍,删掉原缓存文件
  3. 解压还原缓存文件
  4. 缓存验证失败

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions