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

0.0.3 • Public • Published

Redis Hybrid Cache

This client makes use of Redis client tracking to combine:

Only works with Redis >= 6 as it makes use of RESP3.

Quick Start

Installation

npm install --save @hverlin/redis-hybrid-cache

See https://github.com/hverlin/redis-hybrid-cache/packages/1570282

Usage

// create the client and set set client side tracking
const client = await createHybridClient();

const value = await client.get('foo'); // null
await client.set('foo', 'bar', { ttl: 60 });

console.log(await client.get('foo')); // bar, from local cache

Supported commands

  • get
  • set
  • del

Other commands are accessible by using client.getRedisClient() which will return a clientV3 instance of hverlin/redis

Package Sidebar

Install

npm i @hverlin/redis-hybrid-cache

Weekly Downloads

3

Version

0.0.3

License

MIT

Unpacked Size

13.3 kB

Total Files

5

Last publish

Collaborators

  • hverlin