oniyi-cache

0.0.9 • Public • Published

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

/oniyi-cache/

    Package Sidebar

    Install

    npm i oniyi-cache

    Weekly Downloads

    1

    Version

    0.0.9

    License

    MIT

    Unpacked Size

    19.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • bkroeger