Socket
Book a DemoInstallSign in
Socket

ioredis-auto-pipeline

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioredis-auto-pipeline

automatic redis pipeline

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
3.7K
12.53%
Maintainers
1
Weekly downloads
 
Created
Source

ioredis-auto-pipeline

Automatic redis pipeline support. It can increase your throughput by up to 100%. See https://redis.io/topics/pipelining for more details.

All builtin commands are supported, minus subscribe and psubscribe.

Install

npm install ioredis-auto-pipeline

Example

const Redis = require('ioredis')
const auto = require('ioredis-auto-pipeline')

async function run () {
  const redis = auto(new Redis())

  console.log(redis.queued) // number of ops in the queue

  // In any part of your code, call pipeline()
  // to schedule a command to be executed in the next
  // batch of commands.
  const results = await Promise.all([
    redis.get('foo'),
    redis.get('foo'),
    redis.get('foo'),
    redis.get('foo'),
    redis.get('foo')
  ])

  console.log(results)
  await redis.quit()
}

run()

License

MIT

Keywords

ioredis

FAQs

Package last updated on 11 Feb 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.