Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

oniyi-cache

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oniyi-cache

RFC2616 compliant http cache implementation

latest
Source
npmnpm
Version
0.0.9
Version published
Maintainers
1
Created
Source

NPM info

dependencies

RFC2616 compliant http cache implementation

Install

$ npm install --save oniyi-cache

Usage

var oniyiCache = require('oniyi-cache');

oniyiCache({
	storePrivate: false,
	storeNoStore: false,
	ignoreNoLastMod: false,
	requestValidators: [],
	responseValidators: [],
	hostConfig: {
		'www.npmjs.org': {
			storePrivate: true,
			storeNoStore: true
		}	
	}
});

Methods

hash(requestObject)

creates a hash string from the provided request object

addHostConfigs(config)

setHostConfigs(config)

updateHostConfigs(config)

clearHostConfigs(config)

getEvaluator(hostname, config)

Kudos

The basic concept here has been borrowed from Chris Corbyn's node-http-cache.

Changelog

0.0.5 --> added "authorization" to the exclusion list of headers for calculating the request hash

License

MIT © Benjamin Kroeger

Keywords

oniyi-cache

FAQs

Package last updated on 08 Apr 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