{"_id":"dnscache","_rev":"245113","name":"dnscache","description":"dnscache for Node","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"time":{"modified":"2021-06-03T16:02:40.000Z","created":"2013-12-20T21:38:39.907Z","1.0.2":"2019-04-22T21:24:53.396Z","1.0.1":"2017-01-26T17:19:25.440Z","1.0.0":"2016-11-29T17:27:47.091Z","0.0.4":"2016-01-08T21:21:10.430Z","0.0.3":"2015-01-07T19:32:44.071Z","0.0.2":"2014-02-26T19:03:58.563Z","0.0.1":"2013-12-20T21:38:39.907Z"},"users":{"russt":true,"chrisco":true,"byk":true,"kodekracker":true,"bret":true,"antixrist":true,"jerrycauser":true},"author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/yahoo/dnscache.git"},"versions":{"1.0.2":{"name":"dnscache","description":"dnscache for Node","author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"version":"1.0.2","keywords":["dnscache","dns"],"main":"./lib/index.js","scripts":{"pretest":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/ ./test/","test":"nyc mocha ./test/*.js","posttest":"nyc check-coverage --lines 100 --functions 100 --branches 100 && nyc report --reporter=lcov"},"bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"license":"BSD","repository":{"type":"git","url":"git+ssh://git@github.com/yahoo/dnscache.git"},"devDependencies":{"async":"^2.6.2","jshint":"^2.10.2","mocha":"^6.1.4","nyc":"^14.0.0","yui-lint":"^0.2.0"},"dependencies":{"asap":"^2.0.6","lodash.clone":"^4.5.0"},"gitHead":"f785e5dae5068a8b40cd5d64d78733b0e9a23ba5","homepage":"https://github.com/yahoo/dnscache#readme","_id":"dnscache@1.0.2","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","dist":{"shasum":"fd3c24d66c141625f594c77be7a8dafee2a66c8a","size":8550,"noattachment":false,"key":"/dnscache/-/dnscache-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dnscache/download/dnscache-1.0.2.tgz"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"_npmUser":{"name":"sylviom","email":"sylviom@yahoo.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dnscache_1.0.2_1555968293253_0.12381601596816716"},"_hasShrinkwrap":false,"publish_time":1555968293396,"_cnpm_publish_time":1555968293396},"1.0.1":{"name":"dnscache","description":"dnscache for Node","author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"version":"1.0.1","keywords":["dnscache","dns"],"main":"./lib/index.js","scripts":{"pretest":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/ ./test/","test":"jenkins-mocha ./test/*.js","posttest":"istanbul check-coverage"},"bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"license":"BSD","repository":{"type":"git","url":"git+ssh://git@github.com/yahoo/dnscache.git"},"devDependencies":{"async":"~1.5.2","istanbul":"~0.4.3","jenkins-mocha":"~2.6.0","jshint":"~2.9.2","yui-lint":"~0.2.0"},"dependencies":{"asap":"~2.0.3","lodash.clone":"~4.3.2"},"gitHead":"3669aafb400a406b00c5af5ed02dd53fdb3f5b9b","homepage":"https://github.com/yahoo/dnscache#readme","_id":"dnscache@1.0.1","_shasum":"42cb2b9bfb5e8fbdfa395aac74e127fc05074d31","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"drewfolta","email":"drew@folta.net"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"dist":{"shasum":"42cb2b9bfb5e8fbdfa395aac74e127fc05074d31","size":7720,"noattachment":false,"key":"/dnscache/-/dnscache-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dnscache/download/dnscache-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dnscache-1.0.1.tgz_1485451165193_0.7849748465232551"},"directories":{},"publish_time":1485451165440,"_cnpm_publish_time":1485451165440,"_hasShrinkwrap":false},"1.0.0":{"name":"dnscache","description":"dnscache for Node","author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"version":"1.0.0","keywords":["dnscache","dns"],"main":"./lib/index.js","scripts":{"pretest":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/ ./test/","test":"jenkins-mocha ./test/*.js","posttest":"istanbul check-coverage"},"bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"license":"BSD","repository":{"type":"git","url":"git+ssh://git@github.com/yahoo/dnscache.git"},"devDependencies":{"async":"~1.5.2","istanbul":"~0.4.3","jenkins-mocha":"~2.6.0","jshint":"~2.9.2","yui-lint":"~0.2.0"},"dependencies":{"asap":"~2.0.3","lodash.clone":"~4.3.2"},"gitHead":"17250df71debb2ebcb5cadeef5f9b186a3fbe97d","homepage":"https://github.com/yahoo/dnscache#readme","_id":"dnscache@1.0.0","_shasum":"6b60703cdeadae3fafb6c21b51807c8f42a7c6fa","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"drewfolta","email":"drew@folta.net"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"dist":{"shasum":"6b60703cdeadae3fafb6c21b51807c8f42a7c6fa","size":8797,"noattachment":false,"key":"/dnscache/-/dnscache-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dnscache/download/dnscache-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dnscache-1.0.0.tgz_1480440465424_0.3372761416248977"},"directories":{},"publish_time":1480440467091,"_cnpm_publish_time":1480440467091,"_hasShrinkwrap":false},"0.0.4":{"name":"dnscache","description":"dnscache for Node","author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"version":"0.0.4","dependencies":{},"devDependencies":{"jshint":"*","yui-lint":"*","istanbul":"*","vows":"*","async":"*"},"keywords":["dnscache","dns","nagios"],"main":"./lib/index.js","scripts":{"pretest":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/ ./test/","test":"istanbul cover --print both vows -- --spec ./test/*.js"},"bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"licenses":[{"type":"BSD","url":"https://github.com/yahoo/dnscache/blob/master/LICENSE"}],"repository":{"type":"git","url":"git+ssh://git@github.com/yahoo/dnscache.git"},"gitHead":"794fd2ba470ea46db94f519bf9fb18d3e3eaccfa","homepage":"https://github.com/yahoo/dnscache#readme","_id":"dnscache@0.0.4","_shasum":"216af8e640657b741dca44410a90be16980e120d","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"vsacheti","email":"vsacheti@yahoo.com"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"dist":{"shasum":"216af8e640657b741dca44410a90be16980e120d","size":7462,"noattachment":false,"key":"/dnscache/-/dnscache-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/dnscache/download/dnscache-0.0.4.tgz"},"directories":{},"publish_time":1452288070430,"_cnpm_publish_time":1452288070430,"_hasShrinkwrap":false},"0.0.3":{"name":"dnscache","description":"dnscache for Node","author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"version":"0.0.3","dependencies":{},"devDependencies":{"jshint":"*","yui-lint":"*","istanbul":"*","vows":"*","async":"*"},"keywords":["dnscache","dns","nagios"],"main":"./lib/index.js","scripts":{"pretest":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/ ./test/","test":"istanbul cover --print both vows -- --spec ./test/*.js"},"bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"licenses":[{"type":"BSD","url":"https://github.com/yahoo/dnscache/blob/master/LICENSE"}],"repository":{"type":"git","url":"http://github.com/yahoo/dnscache.git"},"gitHead":"76f600d2d444075e82148c50212c0a283f6c5b61","homepage":"https://github.com/yahoo/dnscache","_id":"dnscache@0.0.3","_shasum":"20808463a37123380c130608f2f3b26b710cef43","_from":".","_npmVersion":"2.0.0-alpha.6.0","_npmUser":{"name":"vsacheti","email":"vsacheti@yahoo.com"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"dist":{"shasum":"20808463a37123380c130608f2f3b26b710cef43","size":7468,"noattachment":false,"key":"/dnscache/-/dnscache-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/dnscache/download/dnscache-0.0.3.tgz"},"directories":{},"publish_time":1420659164071,"_cnpm_publish_time":1420659164071,"_hasShrinkwrap":false},"0.0.2":{"name":"dnscache","description":"dnscache for Node","author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"version":"0.0.2","dependencies":{},"devDependencies":{"jshint":"*","yui-lint":"*","istanbul":"*","vows":"*","async":"*"},"keywords":["dnscache","dns","nagios"],"main":"./lib/index.js","scripts":{"pretest":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/ ./test/","test":"istanbul cover --print both vows -- --spec ./test/*.js"},"bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"licenses":[{"type":"BSD","url":"https://github.com/yahoo/dnscache/blob/master/LICENSE"}],"repository":{"type":"git","url":"http://github.com/yahoo/dnscache.git"},"homepage":"https://github.com/yahoo/dnscache","_id":"dnscache@0.0.2","dist":{"shasum":"46d065e438d4575d1fb9cf7e856f8e28e47addf1","size":7364,"noattachment":false,"key":"/dnscache/-/dnscache-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dnscache/download/dnscache-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"vsacheti","email":"vsacheti@yahoo.com"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"directories":{},"publish_time":1393441438563,"_cnpm_publish_time":1393441438563,"_hasShrinkwrap":false},"0.0.1":{"name":"dnscache","description":"dnscache for Node","author":{"name":"Vinit Sacheti","email":"vsacheti@yahoo.com"},"version":"0.0.1","dependencies":{},"devDependencies":{"jshint":"~0.9.0","yui-lint":"~0.1.1","istanbul":"~0.1.8","vows":"*","async":"*"},"keywords":["dnscache","dns","nagios"],"main":"./lib/index.js","scripts":{"pretest":"jshint --config ./node_modules/yui-lint/jshint.json ./lib/ ./test/","test":"istanbul cover --print both vows -- --spec ./test/*.js"},"bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"licenses":[{"type":"BSD","url":"https://github.com/yahoo/dnscache/blob/master/LICENSE"}],"repository":{"type":"git","url":"http://github.com/yahoo/dnscache.git"},"readmeFilename":"README.md","homepage":"https://github.com/yahoo/dnscache","_id":"dnscache@0.0.1","dist":{"shasum":"e0425225182bb9658fc0855efc47ea54086349f6","size":7335,"noattachment":false,"key":"/dnscache/-/dnscache-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dnscache/download/dnscache-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"vsacheti","email":"vsacheti@yahoo.com"},"maintainers":[{"name":"davglass","email":"davglass@gmail.com"},{"name":"drewfolta","email":"drew@folta.net"},{"name":"sylviom","email":"sylviom@yahoo.com"},{"name":"vsacheti","email":"vsacheti@yahoo.com"}],"directories":{},"publish_time":1387575519907,"_cnpm_publish_time":1387575519907,"_hasShrinkwrap":false}},"readme":"dnscache for Node\n===================\n\nThis module wraps the [dns](http://nodejs.org/api/dns.html) module methods and provide a caching layer in between.\nEvery call to a dns method is first looked into the local cache, in case of cache hit the value from cache is returned, in case of cache miss the original dns call is made\nand the return value is cached in the local cache.\n\nIt is very similar to GOF Proxy design pattern providing a Cache Proxy.\n\nThe goal of this module is to cache the most used/most recent dns calls, to avoid the network delay and improve the performance.\n\nOnce this module is enabled, all the subsequent calls to `require('dns')` are wrapped too.\n\n**NOTE:** There are situations where the built-in `dns` functions would throw, rather than call back with an error. Due to the fact that asynchronous caching mechanisms are supported, all errors for these functions will be passed as the first argument to the callback.\n\nInstallation\n------------\n\n`npm install dnscache`\n\nUsage\n-----\n\n```javascript\nvar dns = require('dns'),\n    dnscache = require('dnscache')({\n        \"enable\" : true,\n        \"ttl\" : 300,\n        \"cachesize\" : 1000\n    });\n    \n    //to use the cached dns either of dnscache or dns can be called.\n    //all the methods of dns are wrapped, this one just shows lookup on an example\n    \n    //will call the wrapped dns\n    dnscache.lookup('www.yahoo.com', function(err, result) {\n        //do something with result\n    });\n    \n    //will call the wrapped dns\n    dns.lookup('www.google.com', function(err, result) {\n        //do something with result\n    });\n    \n\n```\n\nConfiguration\n-------------\n\n   * `enable` - Whether dnscache is enabled or not, defaults to `false`.\n   * `ttl` - ttl in seconds for cache-entries. Default: `300`\n   * `cachesize` - number of cache entries, defaults to `1000`\n   * `cache` - If a custom cache needs to be used instead of the supplied cache implementation. Only for Advanced Usage. Custom Cache needs to have same interface for `get` and `set`.\n\n\nAdvanced Caching\n----------------\n\nIf you want to use a different cache mechanism (ex: `mdbm`, `redis`), you only need to create an object similar to this:\n\n```javascript\nvar Cache = function(config) {\n\n    this.set = function(key, value, callback) {};\n\n    this.get = function(key, callback) {};\n};\n```\n\n\nBuild Status\n------------\n\n[![Build Status](https://secure.travis-ci.org/yahoo/dnscache.png?branch=master)](http://travis-ci.org/yahoo/dnscache)\n\n\nNode Badge\n----------\n\n[![NPM](https://nodei.co/npm/dnscache.png)](https://nodei.co/npm/dnscache/)\n","_attachments":{},"homepage":"https://github.com/yahoo/dnscache#readme","bugs":{"url":"http://github.com/yahoo/dnscache/issues"},"license":"BSD"}