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

17.0.1 • Public • Published

@type-cacheable/redis-adapter

npm downloads

TypeScript-based caching decorators to assist with caching (and clearing cache for) async methods. This package supports the redis client.

View full documentation

Usage

Installation

npm install --save @type-cacheable/core @type-cacheable/redis-adapter

Note: If you are using redis v3.x.x, use @type-cacheable/redis-adapter v10.x.x. If you are using redis v4.x.x, use @type-cacheable/redis-adapter v11.x.x+.

or

yarn add @type-cacheable/core @type-cacheable/redis-adapter

Using adapter

import Redis from 'redis';
import { useAdapter } from '@type-cacheable/redis-adapter';

const client = Redis.createClient();
const clientAdapter = useAdapter(client);

Then you can rely on the @Cacheable, @CacheUpdate, and @CacheClear decorators from @type-cacheable/core. See core documentation

Readme

Keywords

Package Sidebar

Install

npm i @type-cacheable/redis-adapter

Weekly Downloads

2,915

Version

17.0.1

License

MIT

Unpacked Size

22.2 kB

Total Files

6

Last publish

Collaborators

  • joshuaslate