New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-throttle-memcached

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-throttle-memcached

Memcached wrapper for express-throttle

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

express-throttle-memcached

Memcached wrapper for express-throttle

npm version

Installation

$ npm install express-throttle-memcached

Usage

var express = require("express");
var throttle = require("express-throttle");
var memcached = require("memcached");
var MemcachedStore = require("express-throttle-memcached");

var app = express();

// Rolling window
app.post("/search", throttle({
  "burst": 10,
	"rate": "5/s",
	"store": new MemcachedStore(new Memcached())
}), function(req, res, next) {
	// ...
});

// Fixed window
app.post("/search", throttle({
  "burst": 10,
  "period": "1min",
  "store": new MemcachedStore(new Memcached())
}), function(req, res, next) {
  // ...
});

Neither express-throttle nor this package will expire / remove / cleanup any keys. This means that memory usage will grow unbounded as new requests are being processed. Thus, it is recommended to have a separate memcached instance only for throttling purposes with a sensible memory limit. Consult the Memcached documentation for more information.

Keywords

FAQs

Package last updated on 18 Jul 2016

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