Skip to content

basalt / cache-redis/src / redisCache

Function: redisCache() ​

> redisCache(url): RedisCacheDriver

Defined in: cache-redis/src/index.ts:106

A Redis-backed cache driver, ready for cachePlugin({ driver }).

ts
cachePlugin({ driver: redisCache(process.env.REDIS_URL!) })

The driver: 'redis' + url shorthand this replaces lived in the core, which meant every consumer of @basaltkit/cache installed ioredis (1.5 MB) — even apps running only the in-memory driver.

Parameters ​

url ​

string

Returns ​

RedisCacheDriver

Released under the MIT License.