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

    2.3.6 • Public • Published

    @keyv/redis keyv

    Redis storage adapter for Keyv

    build codecov npm

    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

    MIT © Jared Wray & Luke Childs

    Install

    npm i @keyv/redis

    DownloadsWeekly Downloads

    67,343

    Version

    2.3.6

    License

    MIT

    Unpacked Size

    6.26 kB

    Total Files

    6

    Last publish

    Collaborators

    • jaredwray
    • lukechilds