Have ideas to improve npm?Join in the discussion! ¬Ľ

    stream-cache-redis

    1.0.2¬†‚Äʬ†Public¬†‚Äʬ†Published

    stream-cache-redis

    Cache a stream in redis

    Build Status

    Install

    npm install stream-cache-redis
    

    Usage

    var getSlowStream = require('./my-slow-stream')
     
    var cachedStream = require('stream-cache-redis')({
      cache: redisClient, // redis-compatible object (get/set/expire)
      key: 'abc',         // cache key
      ttl: 60 * 60,       // expiration in seconds
      get: getSlowStream  // function that returns a stream
    })
     
    // this will be faster
    cachedStream.pipe(process.stdout)
     

    Install

    npm i stream-cache-redis

    DownloadsWeekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar