good-guy-disk-cache

2.1.0 • Public • Published

good-guy-disk-cache

Disk cache adapter for Good Guy HTTP.

Cache your HTTP(S) requests like a gentleman. For use with Good Guy HTTP. Depends on Async Disk Cache.

Usage

var DiskCache = require("good-guy-disk-cache");
var GoodGuy = require('good-guy-http');
 
var diskCache = new DiskCache("my-cache");
// 'my-cache' also serves as the global key for the cache.
// if you have multiple programs with this same `cache-key` they will share the
// same backing store. This by design.
 
var goodGuy = GoodGuy({cache: diskCache});
 
// this request will get its response cached to disk, will be retried if it
// fails, will be collapsed if you happen to make two of them
goodGuy('http://news.ycombinator.com').then(function(response) {
  console.log(response.body);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.0
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.1.0
    7
  • 2.0.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i good-guy-disk-cache

Weekly Downloads

7

Version

2.1.0

License

MIT

Last publish

Collaborators

  • keithws