{"_id":"cache-file","_rev":"247318","name":"cache-file","description":"Store and get files from cache","dist-tags":{"latest":"0.1.7"},"maintainers":[{"name":"wblanchette","email":"wb@wblanchette.com"}],"time":{"modified":"2021-06-03T16:05:31.000Z","created":"2014-03-31T21:10:46.680Z","0.1.7":"2014-03-31T21:13:32.568Z","0.1.6":"2014-03-31T21:10:46.680Z"},"users":{},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"http://kevinmartensson.com"},"repository":{"type":"git","url":"git://github.com/collectivecognition/cache-file.git"},"versions":{"0.1.7":{"name":"cache-file","version":"0.1.7","description":"Store and get files from cache","keywords":["cache","store"],"homepage":"https://github.com/collectivecognition/cache-file","bugs":{"url":"https://github.com/collectivecognition/cache-file/issues"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"http://kevinmartensson.com"},"license":"MIT","repository":{"type":"git","url":"git://github.com/collectivecognition/cache-file.git"},"scripts":{"test":"mocha --reporter list"},"main":"index.js","files":["index.js"],"dependencies":{"hash-file":"~0.1.0","mkdirp":"~0.3.5","rimraf":"~2.2.2"},"devDependencies":{"mocha":"~1.12.0","each-async":"~0.1.1"},"engines":{"node":">=0.10.0"},"_id":"cache-file@0.1.7","dist":{"shasum":"7ab2d4b76619c0121cc32b0c1449893162c338b5","size":1655,"noattachment":false,"key":"/cache-file/-/cache-file-0.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/cache-file/download/cache-file-0.1.7.tgz"},"_from":".","_resolved":"https://registry.npmjs.org/cache-file/-/cache-file-0.1.5.tgz","_npmVersion":"1.3.21","_npmUser":{"name":"wblanchette","email":"wb@wblanchette.com"},"maintainers":[{"name":"wblanchette","email":"wb@wblanchette.com"}],"directories":{},"publish_time":1396300412568,"_cnpm_publish_time":1396300412568,"_hasShrinkwrap":false},"0.1.6":{"name":"cache-file","version":"0.1.6","description":"Store and get files from cache","keywords":["cache","store"],"homepage":"https://github.com/kevva/cache-file","bugs":{"url":"https://github.com/kevva/cache-file/issues"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"http://kevinmartensson.com"},"license":"MIT","repository":{"type":"git","url":"git://github.com/kevva/cache-file.git"},"scripts":{"test":"mocha --reporter list"},"main":"index.js","files":["index.js"],"dependencies":{"hash-file":"~0.1.0","mkdirp":"~0.3.5","rimraf":"~2.2.2"},"devDependencies":{"mocha":"~1.12.0","each-async":"~0.1.1"},"engines":{"node":">=0.10.0"},"_id":"cache-file@0.1.6","dist":{"shasum":"fc1c41f31c1541cbb1ec7e925a3a94e51c91c21b","size":1644,"noattachment":false,"key":"/cache-file/-/cache-file-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/cache-file/download/cache-file-0.1.6.tgz"},"_from":".","_resolved":"https://registry.npmjs.org/cache-file/-/cache-file-0.1.5.tgz","_npmVersion":"1.3.21","_npmUser":{"name":"wblanchette","email":"wb@wblanchette.com"},"maintainers":[{"name":"wblanchette","email":"wb@wblanchette.com"}],"directories":{},"publish_time":1396300246680,"_cnpm_publish_time":1396300246680,"_hasShrinkwrap":false}},"readme":"Store and get files from cache with Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/cache-file): `npm install cache-file`\n\n## Examples\n\n```js\nvar cache = require('cache-file');\n\n// store test.jpg inside a test folder in cache\ncache.store('test.jpg');\n\n// get test.jpg from cache and save it as test-restored.jpg\ncache.get('test.jpg', 'test-restored.jpg');\n\n// check if test.jpg exists in cache\ncache.check('test.jpg');\n\n// get the path to test.jpg in cache\ncache.path('test.jpg');\n\n// remove test.jpg from cache\ncache.clean('test.jpg');\n```\n\n## API\n\n### .store(src, dest)\n\nStore a file inside cache. Use `dest` to specify a custom name.\n\n### .get(src, dest)\n\nGet a cached file and save it to a desired location.\n\n### .check(src)\n\nCheck if a cached file exists.\n\n### .path(src)\n\nGet the path to a cached file.\n\n### .clean(src)\n\nRemove a file from cache.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n","_attachments":{},"homepage":"https://github.com/collectivecognition/cache-file","bugs":{"url":"https://github.com/collectivecognition/cache-file/issues"},"license":"MIT"}