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

Locking redis

Redis Lock 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/locking-redis

Documentation | Website

Building blocks for digital commerce

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

Redis Locking Module Provider for Medusa: implements the Locking Module's locks in Redis, so locks are shared across all Medusa instances. It's the recommended locking provider for production. It ships with and is registered through the path.

At a glance

Package
TypeModule Provider (Locking Module)
Provider ID
Registered by defaultNo (on Medusa Cloud, registered as the default when is set)
Import from

Installation

No installation needed. The provider is a dependency of . You need a running Redis server.

Usage

Register the provider in the Locking Module's array in :

Configuration

OptionTypeDescriptionDefault
Required. The Redis connection URL.-
Options passed to the client.-
Prefix for lock keys.
Default time to wait to acquire a lock, in seconds.
Initial interval between lock attempts, in milliseconds.
Maximum interval between lock attempts, in milliseconds.
Multiplier applied to the retry interval after each attempt.
Environment variableDescription
Value for , as used in the example above.
On Medusa Cloud, registers this provider as the default with this URL.

Resources