Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

rescache

0.0.3 • Public • Published

rescache

Resource caching

Installation

npm install rescache

Quick Start

var rescache = require('rescache');
 
rescache.set('cache.folder', __dirname + '/cache');
rescache.cache('https://github.com/favicon.ico');
 
rescache.read('https://github.com/favicon.ico', function (cache) {
  console.log(cache.mime);
  console.log(cache.charset);
  console.log(cache.buffer.toString('base64'));
});
 
rescache.remove('https://github.com/favicon.ico');

API

rescache

.set(String name, String value)

.cache(String url, [Function callback], [Function onError])

.recache(String url, [Function callback], [Function onError])

.save(String url, Buffer buffer, [Function callback], [Function onError])

.remove(String url, [Function callback], [Function onError])

.read(String url, Function callback, [Function onError])

.has(String url, Function callback, [Function onError])

License

MIT

Keywords

none

install

npm i rescache

Downloadsweekly downloads

3

version

0.0.3

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar