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

0.2.0 • Public • Published

NPM version NPM downloads

Implementation of the redis adapter

Installation

Node.js 14.0.0 or newer is required

Yarn

yarn add @cacher/redis

NPM

npm i @cacher/redis

Example usage

import { Cacher } from '@cacher/cacher';
import { RedisAdapter } from '@cacher/redis';

const adapter = new RedisAdapter();

// const adapter = new RedisAdapter({
//     connection: ioredisClient    
// });

// const adapter = new RedisAdapter({
//     connection: 'redis://:authpassword@127.0.0.1:6380/4'
// });

// const adapter = new RedisAdapter({
//     connection: {
//         hostname: 'localhost',
//         port: 6379,

//         username: '...',
//         password: '...',

//         database: 1
//     }
// });

const cacher = new Cacher({
    adapter,

    namespace: 'users'
});

Readme

Keywords

Package Sidebar

Install

npm i @cacher/redis

Weekly Downloads

4

Version

0.2.0

License

MIT

Unpacked Size

9.05 kB

Total Files

6

Last publish

Collaborators

  • negezor