Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

restify-etag-cache

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restify-etag-cache

Restify ETag Cache. The easy way.

  • 1.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

restify-etag-cache

Build Status devDependency Status Dependency Status Coverage Status

Automatic middleware that enables client cache based on ETag header

Getting Started

Install the module with: npm install restify-etag-cache

Usage

It works as a middleware, so its very easy to use the library:

var restify = require('restify');
var restifyEtagCache = require('restify-etag-cache');

var server = restify.createServer();
var options = {
	ignore_routes : [ '/some/route/to/ignore/:withParam' ],
	ignore_urls : [ '/some/specific/url/to/ignore'  ],
	weak: false
};

server.use(restifyEtagCache(options)); 

Its all ;)

The server will reply HTTP status code 304 (Not Modified) when it detects that the client already have the latest content version.

Options

At this time, there are only two options available:

ignore_urls (array of urls)

ignore_routes (array of routes)

weak (boolean, set to use weak etag generation or not)

Support

IRC #kernelpanic @ irc.kernelpanic.com.ar

Keywords

FAQs

Package last updated on 03 Aug 2017

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