Wondering what’s next for npm?Check out our public roadmap! »

eu-medea-store

0.1.2 • Public • Published

eu-medea-store

A Medea store for Eu.

Medea is an embedded key-value storage library written in pure JavaScript. Eu implements caching semantics on top of the request module. This module allows a persistent, cross-platform HTTP client cache that's 100% JavaScript. Yay!

Build Status

Example

var Eu = require('eu');
var medea = require('medea');
var MedeaStore = require('eu-medea-store');
 
var db = medea();
var store = new MedeaStore(db);
var cache = new Eu.Cache(store, 'test');
 
var eu = new Eu(cache);
 
db.open(function(err) {
  setInterval(function() {
    eu.get('http://some_url_with_cacheable_response', function(err, res) {
      console.log(res.headers['date']);
    });
  }, 1000);
});

License

MIT

Keywords

Install

npm i eu-medea-store

DownloadsWeekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • avatar