This plugin provides a Redis-based RedisCacheStrategy which stores cached items in a Redis instance. This is a high-performance cache strategy which is suitable for production use, and is a drop-in replacement for the DefaultCachePlugin.
Note: To use this plugin, you need to manually install the ioredis package:
Requires Redis 3.2 or later, or a compatible server such as Valkey. Tagged writes run a Lua script
with EVAL. A restricted Redis ACL user needs the @scripting category and these commands:
GET, SET, DEL, MULTI and EXEC for reading, writing and deleting cache items;TIME, ZADD, ZREMRANGEBYSCORE, ZRANGE and PEXPIREAT, which the tag script calls;ZRANGE, ZREM, SRANDMEMBER and SREM for tag invalidation.Configuration options for the RedisCachePlugin.
number128kbThe maximum size of a single cache item in bytes. If a cache item exceeds this size, it will not be stored and an error will be logged.
string'vendure-cache'The namespace to use for all keys stored in Redis. This can be useful if you are sharing a Redis instance between multiple applications.
import('ioredis').RedisOptionsOptions to pass to the ioredis Redis client.