Skip to content

Commit

Permalink
docs: update persistent cache available version and configuration (#8886
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jerrykingxyz authored Dec 30, 2024
1 parent d3a3274 commit 91592bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions website/docs/en/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ module.exports = {

## experiments.cache

<ApiMeta addedVersion="1.2.0" />
<ApiMeta addedVersion="1.2.0-alpha.0" />

- **Type:** `ExperimentCacheOptions`

Expand Down Expand Up @@ -374,7 +374,7 @@ Configuring `experiment.cache` to `false` to disable cache, which is no differen

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: false,
},
};
Expand All @@ -386,7 +386,7 @@ Configuring `experiment.cache` to `true` or `{ "type": "memory" }` to enable mem

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: true,
},
};
Expand All @@ -398,7 +398,7 @@ Configuring `experiment.cache` to `{ "type": "persistent" }` to enable persisten

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: {
type: 'persistent',
},
Expand All @@ -420,7 +420,7 @@ It's recommended to set `cache.buildDependencies`: [__filename] in your rspack c

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: {
type: 'persistent',
buildDependencies: [__filename, path.join(__dirname, './tsconfig.json')],
Expand Down Expand Up @@ -475,7 +475,7 @@ Configure cache storage. Currently only file system storage is supported. The ca

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: {
type: 'persistent',
storage: {
Expand Down
12 changes: 6 additions & 6 deletions website/docs/zh/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ module.exports = {

## experiments.cache

<ApiMeta addedVersion="1.2.0" />
<ApiMeta addedVersion="1.2.0-alpha.0" />

- **类型:** `ExperimentCacheOptions`

Expand Down Expand Up @@ -373,7 +373,7 @@ type ExperimentCacheOptions =

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: false,
},
};
Expand All @@ -385,7 +385,7 @@ module.exports = {

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: true,
},
};
Expand All @@ -397,7 +397,7 @@ module.exports = {

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: {
type: 'persistent',
},
Expand All @@ -419,7 +419,7 @@ module.exports = {

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: {
type: 'persistent',
buildDependencies: [__filename, path.join(__dirname, './tsconfig.json')],
Expand Down Expand Up @@ -474,7 +474,7 @@ module.exports = {

```js title="rspack.config.js"
module.exports = {
experiment: {
experiments: {
cache: {
type: 'persistent',
storage: {
Expand Down

0 comments on commit 91592bb

Please sign in to comment.