Skip to content

Commit a540256

Browse files
authored
docs: change Medusa Cache setup information (medusajs#13802)
1 parent 2d1d51a commit a540256

File tree

2 files changed

+28
-27
lines changed

2 files changed

+28
-27
lines changed

www/apps/cloud/app/cache/page.mdx

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,33 @@ Medusa Cache relies on the existing key/value [Redis](../redis/page.mdx) store a
1818

1919
---
2020

21-
## How Does Medusa Cache Work?
21+
## Enable Medusa Cache
2222

23-
### Enabled by Default
23+
<Prerequisites
24+
items={[
25+
{
26+
text: "Medusa v2.11.0+",
27+
href: "https://github.com/medusajs/medusa/releases/tag/v2.11.0",
28+
}
29+
]}
30+
/>
2431

25-
Medusa Cache is enabled by default for all environments and plans if your Medusa project is running [Medusa v2.11.0 or later](https://github.com/medusajs/medusa/releases/tag/v2.11.0). No configuration is required to start using caching.
32+
To enable Medusa Cache for your Medusa project deployed on Cloud, set the `caching` feature flag in `medusa-config.ts`:
33+
34+
```ts title="medusa-config.ts"
35+
module.exports = defineConfig({
36+
// ...
37+
featureFlags: {
38+
caching: true
39+
}
40+
})
41+
```
42+
43+
This will enable all Medusa Cache functionality in your project.
44+
45+
---
46+
47+
## How Does Medusa Cache Work?
2648

2749
### Cached Data in API Routes
2850

@@ -38,9 +60,7 @@ By using Medusa Cache, data is cached across several business-critical APIs to b
3860

3961
### Integrated into Query
4062

41-
{/* Medusa Cache is built on the new [Caching Module](!resources!/infrastructure-modules/caching). The module has been integrated into [Query](!docs!/learn/fundamentals/module-links/query) so that `query.graph` calls can be cached easily. */}
42-
43-
Medusa Cache is built on the new [Caching Module](#). The module has been integrated into [Query](!docs!/learn/fundamentals/module-links/query) so that `query.graph` calls can be cached easily.
63+
Medusa Cache is built on the new [Caching Module](!resources!/infrastructure-modules/caching). The module has been integrated into [Query](!docs!/learn/fundamentals/module-links/query) so that `query.graph` calls can be cached easily.
4464

4565
You can enable caching for your custom `query.graph` calls by passing a `cache` option. For example:
4666

@@ -63,9 +83,7 @@ This code caches the query result. When the same query is made again, the cached
6383

6484
By default, data is cached for one hour or until invalidated. Invalidation occurs automatically when related data is created, updated, or deleted.
6585

66-
{/* Learn more about automatic invalidation in the [Caching Module documentation](!resources!/infrastructure-modules/caching/concepts#automatic-cache-invalidation). */}
67-
68-
Learn more about automatic invalidation in the [Caching Module documentation](#).
86+
Learn more about automatic invalidation in the [Caching Module documentation](!resources!/infrastructure-modules/caching/concepts#automatic-cache-invalidation).
6987

7088
---
7189

@@ -323,20 +341,3 @@ The following benchmark comparisons demonstrate the performance improvements you
323341
</Table.Row>
324342
</Table.Body>
325343
</Table>
326-
327-
---
328-
329-
## Opt-Out of Medusa Cache
330-
331-
If you want to disable Medusa Cache for your Medusa project, you can do so by disabling the `caching` feature flag in `medusa-config.ts`:
332-
333-
```ts title="medusa-config.ts"
334-
module.exports = defineConfig({
335-
// ...
336-
featureFlags: {
337-
caching: false
338-
}
339-
})
340-
```
341-
342-
This will disable all Medusa Cache functionality in your project.

www/apps/cloud/generated/edit-dates.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ export const generatedEditDates = {
2424
"app/sign-up/page.mdx": "2025-10-08T14:40:47.993Z",
2525
"app/comparison/page.mdx": "2025-09-30T06:17:40.257Z",
2626
"app/billing/plans/page.mdx": "2025-10-08T14:49:27.009Z",
27-
"app/cache/page.mdx": "2025-10-15T06:31:14.375Z",
27+
"app/cache/page.mdx": "2025-10-21T14:27:54.005Z",
2828
"app/deployments/troubleshooting/page.mdx": "2025-10-17T14:44:22.894Z"
2929
}

0 commit comments

Comments
 (0)