No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
test
.gitignore
.jshintignore
.jshintrc
.travis.yml
README.md
package.json
uber-cache-mongodb.js

README.md

mongodb backed implementation of uber-cache

See http://github.com/serby/uber-cache for more details

build status

Installation

  npm install uber-cache-mongodb

Usage

var Db = require('mongodb').Db
  , Server = require('mongodb').Server
  , server = new Server('localhost', 27017, { 'auto_reconnect': true })
  , db = new Db('uber-cache-db', server, { fsync: true, w: 1 })
  , UberCache = require('uber-cache-mongodb')

db.open(function(error, connection) {
  var cache = new UberCache(connection)
  cache.set('the key', 'the value', function() {
    cache.get('the key', function(error, value) {
      console.log(value)
      db.close()
    })
  })
})

Credits

Paul Serby follow me on twitter

Licence

Licenced under the New BSD License