šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

@keyvhq/redis

Package Overview
Dependencies
Maintainers
0
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keyvhq/redis

Redis storage adapter for Keyv

2.1.8
latest
Source
npm
Version published
Weekly downloads
3K
15.68%
Maintainers
0
Weekly downloads
Ā 
Created
Source

@keyvhq/redis keyv

Redis storage adapter for Keyv.

TTL functionality is handled directly by Redis so no timestamps are stored and expired keys are cleaned up internally.

Install

npm install --save @keyvhq/core @keyvhq/redis

Usage

const KeyvRedis = require('@keyvhq/redis')
const Keyv = require('@keyvhq/core')

const keyv = new Keyv({ store: new KeyvRedis('redis://user:pass@localhost:6379') })

Any valid Redis options will be passed directly through:

const KeyvRedis = require('@keyvhq/redis')
const Keyv = require('@keyvhq/core')

const keyv = new Keyv({
  store: new KeyvRedis('redis://user:pass@localhost:6379', {
    disable_resubscribing: true
  })
})

Or you can reuse a previously declared Redis instance:

const KeyvRedis = require('@keyvhq/redis')
const Keyv = require('@keyvhq/core')

const { Redis } = KeyvRedis

const redis = new Redis('redis://user:pass@localhost:6379')
const keyv = new Keyv({ store: new KeyvRedis(redis) })

License

@keyvhq/redis Ā© Luke Childs, released under the MIT License.
Maintained by Microlink with help from contributors.

microlink.io Ā· GitHub microlinkhq Ā· X @microlinkhq

Keywords

adapter

FAQs

Package last updated on 13 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts