{"_id":"cacha","_rev":"299573","name":"cacha","description":"My hunky-dory module","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"time":{"modified":"2021-06-03T19:03:20.000Z","created":"2015-11-11T09:07:38.794Z","1.0.3":"2015-11-15T07:53:27.370Z","1.0.2":"2015-11-15T07:44:51.760Z","1.0.1":"2015-11-11T10:04:50.042Z","1.0.0":"2015-11-11T09:07:38.794Z"},"users":{"soldair":true},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"repository":{"type":"git","url":"https://github.com/floatdrop/cacha"},"versions":{"1.0.3":{"name":"cacha","version":"1.0.3","description":"My hunky-dory module","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/cacha"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":[],"dependencies":{"home-or-tmp":"^2.0.0","mkdirp":"^0.5.1","path-is-absolute":"^1.0.0","pify":"^2.3.0","pinkie-promise":"^2.0.0"},"devDependencies":{"ava":"^0.4.0","mock-fs":"^3.4.0","xo":"^0.10.0"},"xo":{"ignores":["test.js"]},"gitHead":"3c7b0102c479b6ec9f13ab508c2afa4c85d134b4","bugs":{"url":"https://github.com/floatdrop/cacha/issues"},"homepage":"https://github.com/floatdrop/cacha","_id":"cacha@1.0.3","_shasum":"e0671846b00acee2b3b46a4208a536150238491e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.0","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"e0671846b00acee2b3b46a4208a536150238491e","size":2430,"noattachment":false,"key":"/cacha/-/cacha-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/cacha/download/cacha-1.0.3.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"directories":{},"publish_time":1447574007370,"_cnpm_publish_time":1447574007370,"_hasShrinkwrap":false},"1.0.2":{"name":"cacha","version":"1.0.2","description":"My hunky-dory module","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/cacha"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":[],"dependencies":{"home-or-tmp":"^2.0.0","mkdirp":"^0.5.1","pify":"^2.3.0","pinkie-promise":"^2.0.0"},"devDependencies":{"ava":"^0.4.0","mock-fs":"^3.4.0","xo":"^0.10.0"},"xo":{"ignores":["test.js"]},"gitHead":"42d62dce2cd51aa0244625477eb982048bf003e5","bugs":{"url":"https://github.com/floatdrop/cacha/issues"},"homepage":"https://github.com/floatdrop/cacha","_id":"cacha@1.0.2","_shasum":"6cebb1185a618f3e03d9e580e0ec7f3ec3c07332","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.0","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"6cebb1185a618f3e03d9e580e0ec7f3ec3c07332","size":2408,"noattachment":false,"key":"/cacha/-/cacha-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/cacha/download/cacha-1.0.2.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"directories":{},"publish_time":1447573491760,"_cnpm_publish_time":1447573491760,"_hasShrinkwrap":false},"1.0.1":{"name":"cacha","version":"1.0.1","description":"My hunky-dory module","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/cacha"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":[],"dependencies":{"home-or-tmp":"^2.0.0","mkdirp":"^0.5.1","pify":"^2.3.0","pinkie-promise":"^1.0.0"},"devDependencies":{"ava":"^0.4.0","mock-fs":"^3.4.0","xo":"^0.10.0"},"xo":{"ignores":["test.js"]},"gitHead":"b4752e2e8ccfb504f2c54cac75d8e72bba3994b3","bugs":{"url":"https://github.com/floatdrop/cacha/issues"},"homepage":"https://github.com/floatdrop/cacha","_id":"cacha@1.0.1","_shasum":"5f22c989ab236d90c2abb6de5a048a10ce6defc6","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.0","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"5f22c989ab236d90c2abb6de5a048a10ce6defc6","size":2313,"noattachment":false,"key":"/cacha/-/cacha-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/cacha/download/cacha-1.0.1.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"directories":{},"publish_time":1447236290042,"_cnpm_publish_time":1447236290042,"_hasShrinkwrap":false},"1.0.0":{"name":"cacha","version":"1.0.0","description":"My hunky-dory module","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/cacha"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com","url":"github.com/floatdrop"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":[],"dependencies":{"home-or-tmp":"^2.0.0","mkdirp":"^0.5.1","pinkie-promise":"^1.0.0"},"devDependencies":{"ava":"^0.4.0","mock-fs":"^3.4.0","xo":"^0.10.0"},"xo":{"ignores":["test.js"]},"gitHead":"c97cdb4c6b472e5703a86669d680c1e67c1e06dc","bugs":{"url":"https://github.com/floatdrop/cacha/issues"},"homepage":"https://github.com/floatdrop/cacha","_id":"cacha@1.0.0","_shasum":"ecd0814e0586d43280cd08a398ab3b4233a913c0","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.0","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"ecd0814e0586d43280cd08a398ab3b4233a913c0","size":2325,"noattachment":false,"key":"/cacha/-/cacha-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/cacha/download/cacha-1.0.0.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"directories":{},"publish_time":1447232858794,"_cnpm_publish_time":1447232858794,"_hasShrinkwrap":false}},"readme":"# cacha [![Build Status](https://travis-ci.org/floatdrop/cacha.svg?branch=master)](https://travis-ci.org/floatdrop/cacha)\n\n> Cache on file-system\n\n\n## Install\n\n```\n$ npm install --save cacha\n```\n\n\n## Usage\n\n```js\nconst Cache = require('cacha');\nconst cache = new Cacha('.my/cache');\n\ncache.set('id', 'content');\n//=> Promise\n\ncache.get('id');\n//=> Promise with 'content'\n```\n\n\n## API\n\n### cacha(namespace, [options])\n\n#### namespace\n\nType: `string`\n\nDirectory in HOME or TMP directory of current user.\n\nIf namespace begins with `/` it will be interpreted as absolute path.\n\n#### options\n\n##### ttl\n\nType: `Number`  \nDefault: `86400000`\n\nHow long (in milliseconds) keep entries in cache.\n\n\n### cache.get(id, [options])\n\n### cache.getSync(id, [options])\n\n### cache.set(id, content, [options])\n\n### cache.setSync(id, content, [options])\n\nGet and set methods for cache entries. `options` are passed to `fs` write and read methods (for example to specify encoding).\n\n### cache.clean()\n\nRemoves outdated entries in cache.\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)\n","_attachments":{},"homepage":"https://github.com/floatdrop/cacha","bugs":{"url":"https://github.com/floatdrop/cacha/issues"},"license":"MIT"}