{"_id":"resourcecache","_rev":"17-24c888ea196d99c599764a9bcb63b641","name":"resourcecache","description":"Caches resources from a string or URL in local files.","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"resourcecache","version":"0.1.0","description":"Caches resources from a string or URL in local files.","author":{"name":"Ruben Verborgh","email":"ruben.verborgh@gmail.com"},"keywords":["cache","resource"],"main":"./lib/resourcecache.js","engines":{"node":">=0.6.0"},"dependencies":{},"devDependencies":{"vows":"~0.6.0","should":"~0.3.2","express":"~2.5.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/RubenVerborgh/ResourceCache.git"},"bugs":{"url":"http://github.com/RubenVerborgh/ResourceCache/issues"},"_npmUser":{"name":"rubenverborgh","email":"ruben.verborgh@gmail.com"},"_id":"resourcecache@0.1.0","_engineSupported":true,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"0bc9cab1ddbcf745f67da163d698284215ceb064","tarball":"https://registry.npmjs.org/resourcecache/-/resourcecache-0.1.0.tgz","integrity":"sha512-AA8cr7sIocbO/M7ttmV2ri33kNf13MUDq8o4aszST2y3Jsr7r19sKOZW35N28IGmXwliJEGH5msZxRAWqu8AeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsyKwM613c9h7djjBEiEmQtYjeBlVz9J+SdFL9+QauEAIgctTJXaWIgdfnDb1bMs2nJM2u4+h7WY6IdNIxMeEcUHs="}]},"maintainers":[{"name":"rubenverborgh","email":"ruben.verborgh@gmail.com"}],"directories":{}},"0.1.1":{"name":"resourcecache","version":"0.1.1","description":"Caches resources from a string or URL in local files.","author":{"name":"Ruben Verborgh","email":"ruben.verborgh@gmail.com"},"keywords":["cache","resource"],"main":"./lib/resourcecache.js","engines":{"node":">=0.6.0"},"dependencies":{},"devDependencies":{"vows":"~0.6.0","should":"~0.3.2","express":"~2.5.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/RubenVerborgh/ResourceCache.git"},"bugs":{"url":"http://github.com/RubenVerborgh/ResourceCache/issues"},"_npmUser":{"name":"rubenverborgh","email":"ruben.verborgh@gmail.com"},"_id":"resourcecache@0.1.1","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"eff493b88c1c9e477bd502e84506736989a4fe7d","tarball":"https://registry.npmjs.org/resourcecache/-/resourcecache-0.1.1.tgz","integrity":"sha512-Xx8R3uSGoYOcHr9YY+zA8ql//fy9HrHNgZyHJbcj73bffe3cT9czsMd9rk9VzYZLvTbwz2z1OCbAKCD08dudUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDnuZHz+rWar2PasNImxMpYirZhovOiCe9tFBUKD9QDeAiAjlZSaKNHJ/IPHcyIdlySQT+acl8v5gN8jPsp85C1bvQ=="}]},"maintainers":[{"name":"rubenverborgh","email":"ruben.verborgh@gmail.com"}],"directories":{}},"0.1.2":{"name":"resourcecache","version":"0.1.2","description":"Caches resources from a string or URL in local files.","author":{"name":"Ruben Verborgh","email":"ruben.verborgh@gmail.com"},"keywords":["cache","resource"],"main":"./lib/resourcecache.js","engines":{"node":">=0.6.0"},"dependencies":{},"devDependencies":{"vows":"~0.6.0","should":"~0.3.2","express":"~2.5.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/RubenVerborgh/ResourceCache.git"},"bugs":{"url":"http://github.com/RubenVerborgh/ResourceCache/issues"},"readme":"# ResourceCache\nNode.js library that caches resources from a string or URL in local files.\n\n## Installation\n\n``` bash\n$ npm install resourcecache\n```\n\n## Usage\nFirst, load the `ResourceCache` class from the `resourcecache` module and create an instance.\n\n``` js\nResourceCache = require('resourcecache');\ncache = new ResourceCache();\n```\n\nThen, you can cache a piece of text in a file like this:\n\n``` js\ncache.cacheFromString('text', function (error, fileName) {\n  console.log('The text has been cached inside', fileName);\n  console.log('This file contains:', require('fs').readFileSync(fileName, 'utf-8'));\n});\n```\n\nOr you can cache an online resource:\n\n``` js\ncache.cacheFromUrl('http://perdu.com/', function (error, fileName) {\n  console.log('The resource has been cached inside', fileName);\n  console.log('This file contains:', require('fs').readFileSync(fileName, 'utf-8'));\n});\n```\n    \nRelease the file when you don't need it anymore:\n\n``` js\ncache.release(fileName);\n```\n\nWhen the process exits, all remaining files will be released.\n\n## Status\nThis library is in alpha stage and doesn't do much caching yet.  \nHowever, the described interface has been implemented and is fully functional.\n\nAn example use can be seen in the [EyeServer](https://github.com/RubenVerborgh/EyeServer/blob/master/lib/eye.js) project.\n","_id":"resourcecache@0.1.2","dist":{"shasum":"c0a64433496d72da2500a52cbf8d0846d3649838","tarball":"https://registry.npmjs.org/resourcecache/-/resourcecache-0.1.2.tgz","integrity":"sha512-1mqrTLQR2QLEQLSxb2oevOHV1CBbrxX0B5yPPpMiNxnHzF4u/e408wQFF4E8LG8thyiPzMKbkErJhGgJdkOSkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY4/yuDwOGAuOoPH9C3sfuWbnH0BkJnwfEuLKiFVTUSgIhAPkeQmQFOyZA7W380RyTw7cyQEPepujxzhgYOqnOkZZy"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"rubenverborgh","email":"ruben.verborgh@gmail.com"},"maintainers":[{"name":"rubenverborgh","email":"ruben.verborgh@gmail.com"}]}},"readme":"# ResourceCache\nNode.js library that caches resources from a string or URL in local files.\n\n## Installation\n\n    npm install resourcecache\n\n## Usage\nFirst, load the `ResourceCache` class from the `resourcecache` module and create an instance.\n\n    ResourceCache = require('resourcecache');\n    cache = new ResourceCache();\n\nThen, you can cache a piece of text in a file like this:\n\n    cache.cacheFromString('text', function (error, fileName) {\n      console.log('The text has been cached inside', fileName);\n      console.log('This file contains:', require('fs').readFileSync(fileName, 'utf-8'));\n    });\n\nOr you can cache an online resource:\n\n    cache.cacheFromUrl('http://perdu.com/', function (error, fileName) {\n      console.log('The resource has been cached inside', fileName);\n      console.log('This file contains:', require('fs').readFileSync(fileName, 'utf-8'));\n    });\n    \nRelease the file when you don't need it anymore:\n\n    cache.release(fileName);\n\nWhen the process exits, all remaining files will be released.\n\n## Status\nThis library is in alpha stage and doesn't do much caching yet.  \nHowever, the described interface has been implemented and is fully functional.\n","maintainers":[{"name":"rubenverborgh","email":"ruben.verborgh@gmail.com"}],"time":{"modified":"2022-06-26T11:56:13.882Z","created":"2011-12-13T04:57:59.912Z","0.1.0":"2011-12-13T04:58:12.646Z","0.1.1":"2011-12-16T07:10:06.506Z","0.1.2":"2013-03-28T17:27:04.436Z"},"author":{"name":"Ruben Verborgh","email":"ruben.verborgh@gmail.com"},"repository":{"type":"git","url":"http://github.com/RubenVerborgh/ResourceCache.git"}}