C
Caching redis
Redis Caching for Medusa
@medusajs/caching-redis
Documentation | Website
Building blocks for digital commerce
Redis Caching Module Provider for Medusa: stores the Caching Module's cached data in Redis, with tag-based invalidation and compression of large values. Use it in production so cached data is shared across Medusa instances. It ships with and is registered through the path.
At a glance
| Package | |
| Type | Module Provider (Caching Module) |
| Provider ID | |
| Registered by default | No (on Medusa Cloud, registered when is set) |
| Import from |
Installation
No installation needed. The provider is a dependency of . You need a running Redis server.
Usage
The Caching Module is behind the feature flag. Enable it with , then register the provider in the Caching Module's array in :
Configuration
| Option | Type | Description | Default |
|---|---|---|---|
| Required. The Redis connection URL. | - | ||
| Options passed to the client. Passing them at the top level of is deprecated. | - | ||
| Default time-to-live of cached entries, in seconds. | |||
| Prefix added to all cache keys. | |||
| Minimum size in bytes of a value before it's compressed. |
| Environment variable | Description |
|---|---|
| Set to to enable the Caching Module. | |
| Value for , as used in the example above. |

