diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts
index ec8140e59..aca376438 100644
--- a/packages/core/src/config.ts
+++ b/packages/core/src/config.ts
@@ -473,7 +473,11 @@ export async function createConstantRsbuildConfig(): Promise<EnvironmentConfig>
           moduleIds: 'named',
           nodeEnv: false,
         },
+        cache: true,
         experiments: {
+          cache: {
+            type: 'persistent',
+          },
           rspackFuture: {
             bundlerInfo: {
               force: false,
@@ -1616,7 +1620,20 @@ export async function composeRsbuildEnvironments(
 
   for (const { format, id, config } of rsbuildConfigWithLibInfo) {
     const libId = typeof id === 'string' ? id : composeDefaultId(format);
-    environments[libId] = config;
+    environments[libId] = mergeRsbuildConfig(config, {
+      tools: {
+        rspack: {
+          experiments: {
+            cache: {
+              version:
+                libId +
+                config.source?.entry?.index +
+                config.output?.distPath?.root,
+            },
+          },
+        },
+      },
+    } as EnvironmentConfig);
     environmentWithInfos.push({ id: libId, format, config });
   }
 
diff --git a/packages/core/tests/__snapshots__/config.test.ts.snap b/packages/core/tests/__snapshots__/config.test.ts.snap
index 5b9221534..5736d33a2 100644
--- a/packages/core/tests/__snapshots__/config.test.ts.snap
+++ b/packages/core/tests/__snapshots__/config.test.ts.snap
@@ -140,7 +140,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
         "htmlPlugin": false,
         "rspack": [
           {
+            "cache": true,
             "experiments": {
+              "cache": {
+                "type": "persistent",
+              },
               "rspackFuture": {
                 "bundlerInfo": {
                   "force": false,
@@ -395,7 +399,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
         "htmlPlugin": false,
         "rspack": [
           {
+            "cache": true,
             "experiments": {
+              "cache": {
+                "type": "persistent",
+              },
               "rspackFuture": {
                 "bundlerInfo": {
                   "force": false,
@@ -621,7 +629,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
         "htmlPlugin": false,
         "rspack": [
           {
+            "cache": true,
             "experiments": {
+              "cache": {
+                "type": "persistent",
+              },
               "rspackFuture": {
                 "bundlerInfo": {
                   "force": false,
@@ -794,7 +806,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
         "htmlPlugin": false,
         "rspack": [
           {
+            "cache": true,
             "experiments": {
+              "cache": {
+                "type": "persistent",
+              },
               "rspackFuture": {
                 "bundlerInfo": {
                   "force": false,
diff --git a/website/rspress.config.ts b/website/rspress.config.ts
index 84a91d160..33fa640f2 100644
--- a/website/rspress.config.ts
+++ b/website/rspress.config.ts
@@ -84,6 +84,16 @@ export default defineConfig({
     dev: {
       lazyCompilation: true,
     },
+    tools: {
+      rspack: {
+        cache: true,
+        experiments: {
+          cache: {
+            type: 'persistent',
+          },
+        },
+      },
+    },
     source: {
       alias: {
         '@components': path.join(__dirname, '@components'),