@jmrl23/redis-store
TypeScript icon, indicating that this package has built-in type declarations

2.3.4 • Public • Published

Cache Manager Redis Store

Redis store for Cache Manager

Sample usage

import { caching } from 'cache-manager';
import redisStore from '@jmrl23/redis-store';

async function main() {
  const store = redisStore({
    url: 'redis://',
    prefix: 'Example',
  });
  const cache = await caching(store);

  await cache.set('message', 'Hello, World!');

  const message = await cache.get<string>('message');

  console.log(message); // Hello, World!

  await store.disconnect();
}

void main();

Options

Key Description Type
prefix Prefix for keys string?
ttl Time to Live, 0 is to disable number?

Package Sidebar

Install

npm i @jmrl23/redis-store

Weekly Downloads

6

Version

2.3.4

License

MIT

Unpacked Size

8.87 kB

Total Files

7

Last publish

Collaborators

  • jmrl23