docs: Caching Module (#13701)

* standard docs for caching module + deprecated cache module

* added guides for creating + using, and overall changes from cache to caching

* fix details related to redis provider

* fix build errors

* fix build error

* fixes

* add guides to sidebar

* add sidebar util

* document query + index

* moved cache tag conventions

* fix build errors

* added migration guide

* added memcached guide

* fixes

* general fixes and updates

* updated reference

* document medusa cache

* small fix

* fixes

* remove cloud cache

* revert edit dates changes

* revert edit dates

* small update
This commit is contained in:
Shahed Nasser
2025-10-21 10:34:27 +03:00
committed by GitHub
parent eefda0edce
commit 76f9da5ef4
50 changed files with 10530 additions and 145 deletions
@@ -120,11 +120,11 @@ So, add the following script in `package.json`:
## 3. Install Production Modules and Providers
By default, your Medusa application uses modules and providers useful for development, such as the In-Memory Cache Module or the Local File Module Provider.
By default, your Medusa application uses modules and providers useful for development, such as the Local File Module Provider.
Its highly recommended to instead use modules and providers suitable for production, including:
- [Redis Cache Module](!resources!/infrastructure-modules/cache/redis)
- [Redis Caching Module](!resources!/infrastructure-modules/caching/providers/redis)
- [Redis Event Bus Module](!resources!/infrastructure-modules/event/redis)
- [Workflow Engine Redis Module](!resources!/infrastructure-modules/workflow-engine/redis)
- [Redis Locking Module Provider](!resources!/infrastructure-modules/locking/redis)
@@ -132,6 +132,12 @@ Its highly recommended to instead use modules and providers suitable for prod
- [S3 File Module Provider](!resources!/infrastructure-modules/file/s3) (or other file module providers that are production-ready).
- [SendGrid Notification Module Provider](!resources!/infrastructure-modules/notification/sendgrid) (or other notification module providers that are production-ready).
<Note>
The Caching Module was introduced in [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0) to replace the deprecated Cache Module.
</Note>
Then, add these modules in `medusa-config.ts`:
```ts title="medusa-config.ts"
@@ -141,9 +147,18 @@ module.exports = defineConfig({
// ...
modules: [
{
resolve: "@medusajs/medusa/cache-redis",
resolve: "@medusajs/medusa/caching",
options: {
redisUrl: process.env.REDIS_URL,
providers: [
{
resolve: "@medusajs/cache-redis",
id: "caching-redis",
is_default: true,
options: {
redisUrl: process.env.CACHE_REDIS_URL,
},
},
],
},
},
{