🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

couch-cache

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couch-cache

A cache solution for CouchDB documents.

latest
Source
npmnpm
Version
0.2.4
Version published
Maintainers
1
Created
Source

Couch Cache

A cache solution for CouchDB documents.

CouchCache uses the _changes feed in CouchDB to invalidate documents.

Usage

var CouchCache = require('couch-cache')

var cache = new CouchCache({ db: 'http://localhost:5984/database'
                           , max: 1000
                           })

cache.get('document_id', function (err, doc) {
  console.log(doc)
})

Install

$ npm install couch-cache

Options

The db option is required. All options in follow and lru-cache is available except for the since option in follow.

  • prefix A string to prefix the CouchDB ids with.

API

CouchCache inherits from EventEmitter. All the method on AsyncCache is proxied.

  • CouchCache#destroy Stops the changes watcher.

Licence

MIT

Keywords

couch

FAQs

Package last updated on 04 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts