{"_id":"cachedown","_rev":"9-01602695362d89f72d4a4a28ae604907","name":"cachedown","description":"leveldown implementation that proxies to underlying leveldown instance with lru cache","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"cachedown","version":"1.0.0","description":"leveldown implementation that proxies to underlying leveldown instance with lru cache","main":"index.js","scripts":{"test":"node test/test"},"author":{"name":"Mark Vayngrib","email":"mark.vayngrib@lablz.com","url":"http://github.com/mvayngrib"},"license":"MIT","dependencies":{"abstract-leveldown":"^2.4.1","lru-cache":"^3.2.0"},"devDependencies":{"levelup":"^1.3.1","memdown":"^1.1.0","rimraf":"^2.4.4","tape":"^4.2.2"},"gitHead":"bbacbd5f2e0da6aa1a9965e5a0837a1579d36d6a","_id":"cachedown@1.0.0","_shasum":"d43f036e4510696b31246d7db31ebf0f7ac32d15","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"tradle","email":"gene.vayngrib@tradle.io"},"dist":{"shasum":"d43f036e4510696b31246d7db31ebf0f7ac32d15","tarball":"https://registry.npmjs.org/cachedown/-/cachedown-1.0.0.tgz","integrity":"sha512-t+yVk82vQWCJF3PsWHMld+jhhjkkWjcAzz8NbFx1iULOXWl8Tm/FdM4smZNVw3MRr0X+lVTx9PKzvEn4Ng19RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeE0dOmMQ1T7Pn33YuYS5p2Y058Ll1rRRXJJZ0mltgbwIgeAxfgUi5f2sDWQL/Vl+LZwtWXogBERPhYBD2y6P+Jag="}]},"maintainers":[{"name":"tradle","email":"gene.vayngrib@tradle.io"}],"directories":{}}},"readme":"# cachedown\n\nleveldown with a cache, for fast puts and gets\n\n[![Build Status](https://travis-ci.org/mvayngrib/cachedown.png)](https://travis-ci.org/mvayngrib/cachedown)\n\n## Usage\n\n```js\nvar slow = require('leveldown')\nvar fast = require('cachedown')\nvar levelup = require('levelup')\n\nvar db = levelup('./db.db', {\n  db: function (location) {\n    // careful! this db has a max cache size of Infinity!\n    // to limit cache size, use fast(location, slow).maxSize(/* max size */)\n    return fast(location, slow)\n  }\n})\n\n// use db with better performance for puts and gets\ndb.put('hey', 'ho', function (err) {\n  db.get('hey', function (err, val) {\n    // val comes from internal cache\n    console.log(val) // ho\n  })\n})\n```\n\n### Misc\n\n```js\n// 1\n\nvar leveldown = require('leveldown')\nvar levelup = require('levelup')\nvar cachedown = require('cachedown')\n// set default leveldown\ncachedown.setLeveldown(leveldown)\nvar db = levelup('path/to/db', { db: cachedown })\n\n// 2\n\nvar cachedownInstance = new cachedown('path/to/db')\n// change max size\ncachedownInstance.maxSize(100)\n// clear cache\ncachedownInstance.clearCache()\n```\n","maintainers":[{"email":"martin.heidegger@gmail.com","name":"leichtgewicht"},{"email":"mark@tradle.io","name":"tenaciousmv"},{"email":"ellen@tradle.io","name":"pgmemk"},{"email":"simon.wilkinson@tradle.io","name":"spwilko"},{"email":"gene.vayngrib@tradle.io","name":"genevayngrib"}],"time":{"modified":"2022-06-13T05:23:42.352Z","created":"2015-12-12T22:51:58.243Z","1.0.0":"2015-12-12T22:51:58.243Z"},"author":{"name":"Mark Vayngrib","email":"mark.vayngrib@lablz.com","url":"http://github.com/mvayngrib"},"license":"MIT","readmeFilename":"README.md"}