You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Kiko Beats 46b9b67d1a
ci: add merge-reports script
3 years ago
..
src refactor: set already handle undefined 3 years ago
test docs: tweaks 3 years ago
CHANGELOG.md chore(release): v1.0.2 3 years ago
Dockerfile docs: tweaks 3 years ago
README.md docs: tweaks 3 years ago
docker-compose.yml docs: tweaks 3 years ago
package.json ci: add merge-reports script 3 years ago

README.md

@keyv/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 keyv @keyv/redis

Usage

const Keyv = require('keyv')

const keyv = new Keyv('redis://user:pass@localhost:6379')
keyv.on('error', handleConnectionError)

Any valid Redis options will be passed directly through.

e.g:

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

Or you can manually create a storage adapter instance and pass it to Keyv:

const KeyvRedis = require('@keyv/redis')
const Keyv = require('keyv')

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

Or reuse a previous Redis instance:

const KeyvRedis = require('@keyv/redis')
const Redis = require('ioredis')
const Keyv = require('keyv')

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

License

@keyvhq/redis © Microlink, Released under the MIT License.
Authored and maintained by Microlink with help from contributors.

microlink.io · GitHub @MicrolinkHQ · Twitter @microlinkhq