Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@keyvhq/redis

Package Overview
Dependencies
Maintainers
2
Versions
32
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

  • 1.6.10
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
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')
})

keyv.on('error', handleConnectionError)

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 = require('ioredis')

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 · Twitter @microlinkhq

Keywords

FAQs

Package last updated on 01 Apr 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc