Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-78.74%
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 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

FAQs

Package last updated on 29 Nov 2019

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