0.0.3 • Published 3 years ago

@hverlin/redis-hybrid-cache v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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