The production-ready Medusa DTC Starter is outRead the announcement
C

Caching redis

Redis Caching for Medusa

Included in @medusajs/medusa, no separate install needed
Category
Built by
Version
2.22.4
Last updated
7 hours ago
Monthly downloads
Loading downloads

Medusa logo

@medusajs/caching-redis

Documentation | Website

Building blocks for digital commerce

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs

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
TypeModule Provider (Caching Module)
Provider ID
Registered by defaultNo (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

OptionTypeDescriptionDefault
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 variableDescription
Set to to enable the Caching Module.
Value for , as used in the example above.

Resources