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

Readme

Keywords

none

Package Sidebar

Install

npm i rescache

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • shallker-wang