{"_id":"native-dns-cache","_rev":"7-8542734ae1eed1e6fe7e19676eebb524","name":"native-dns-cache","description":"DNS Caching Library","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"native-dns-cache","version":"0.0.1","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"DNS Caching Library","keywords":["dns","caching"],"homepage":"http://github.com/tjfontaine/native-dns-cache","bugs":{"url":"http://github.com/tjfontaine/native-dns-cache/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/native-dns-cache.git"},"main":"index.js","engines":{"node":">= 0.5.0"},"scripts":{},"dependencies":{"binaryheap":">= 0.0.2","native-dns-packet":">= 0.0.1"},"devDependencies":{},"readme":"Cache\n-----\n\nIf you perform a query on an A or AAAA type and it doesn't exist, the cache\nwill attempt to lookup a CNAME and then resolve that.\n\nThe constructor takes an optional object with the following properties:\n\n * `store` -- implements the cache store model (optional, default MemoryStore)\n\nMethods:\n\n * `lookup(question, cb)` -- for a given question check the cache store for\nexistence\n * `store(packet)` -- iterates over the resource records in a packet and sends\nthem to the cache store\n * `purge()` -- clears the cache store of all entries\n\nMemoryStore / Cache store model\n-------------------------------\n\n`MemoryStore(opts)` -- An in memory store based on a js object\n\nMethods:\n\n * `get(domain, key, cb)`\n  - `domain` is the holder under which keys will be applied,\n`key` is the subdomain that is being queried for.\nIf you `get('example.com', 'www', cb)` you are really asking for `www.example.com`.\n  - `cb(err, results)` -- results is an object of types and array of answers\n   * `{ 1: [{address: '127.0.0.1', ttl: 300, type: 1, class: 1}] }`\n * `set(domain, key, data, cb)`\n  - `domain` is the parent under which this key is stored.\n`key` is the subdomain we are storing, `data` is an object of types with an array of answers.\n   * `set('example.com', 'www', {1: [{class:1, type:1, ttl:300, address:'127.0.0.1'}]}, cb)`\n  - `cb(err, data)` -- cb merely returns the data that was passed.\n * `delete(domain[, key[, type]], cb)` -- delete all from a domain, a domain and key,\nor a domain a key and a type.\n\nLookup\n------\n\nIs a mechanism that given a store performs the common resolution pattern.\n\nGiven `example.com` previous added to a store:\n\n  * `www.example.com CNAME foo.bar.example.com.`\n  * `*.example.com A 127.0.0.1`\n\nA `Lookup(store, 'example.com', {name:'www.example.com', type:1}, cb)`\nwill resolve `www` to the CNAME and then search for `foo.bar.example.com` which\nwill return no results, and then search for `*.bar.example.com` which will also\nreturn no results, and ultimately searches for `*.example.com` which will return\nthe desired record.\n\nCallback will be called with `(err, results)` where results is an array suitable\nfor use in `Packet.answer`\n","readmeFilename":"README.md","_id":"native-dns-cache@0.0.1","dist":{"shasum":"bbe9c23bc6d9c92cf4436e20493b91a3f59bd742","tarball":"https://registry.npmjs.org/native-dns-cache/-/native-dns-cache-0.0.1.tgz","integrity":"sha512-QXxAGqI9+H3QqB4qciT/vwTiWXXwnToC/YV+bsTNMgDwgMAIUZrbUGxmDoteolCTfgxEs6L6VijOGYp1RK80Hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUvbyrJdfrOv2h0E5x9fAYa2lV+1D/DDqK5Z2av9LO+wIgXLgrA5rPGwc8ML5V5k2aPiFy/B7pLF+ViaRR60ph2DY="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":"tjfontaine@gmail.com"}]},"0.0.2":{"name":"native-dns-cache","version":"0.0.2","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"DNS Caching Library","keywords":["dns","caching"],"homepage":"http://github.com/tjfontaine/native-dns-cache","bugs":{"url":"http://github.com/tjfontaine/native-dns-cache/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/native-dns-cache.git"},"main":"index.js","engines":{"node":">= 0.5.0"},"scripts":{},"dependencies":{"binaryheap":">= 0.0.3","native-dns-packet":">= 0.0.1"},"devDependencies":{},"readme":"Cache\n-----\n\nIf you perform a query on an A or AAAA type and it doesn't exist, the cache\nwill attempt to lookup a CNAME and then resolve that.\n\nThe constructor takes an optional object with the following properties:\n\n * `store` -- implements the cache store model (optional, default MemoryStore)\n\nMethods:\n\n * `lookup(question, cb)` -- for a given question check the cache store for\nexistence\n * `store(packet)` -- iterates over the resource records in a packet and sends\nthem to the cache store\n * `purge()` -- clears the cache store of all entries\n\nMemoryStore / Cache store model\n-------------------------------\n\n`MemoryStore(opts)` -- An in memory store based on a js object\n\nMethods:\n\n * `get(domain, key, cb)`\n  - `domain` is the holder under which keys will be applied,\n`key` is the subdomain that is being queried for.\nIf you `get('example.com', 'www', cb)` you are really asking for `www.example.com`.\n  - `cb(err, results)` -- results is an object of types and array of answers\n   * `{ 1: [{address: '127.0.0.1', ttl: 300, type: 1, class: 1}] }`\n * `set(domain, key, data, cb)`\n  - `domain` is the parent under which this key is stored.\n`key` is the subdomain we are storing, `data` is an object of types with an array of answers.\n   * `set('example.com', 'www', {1: [{class:1, type:1, ttl:300, address:'127.0.0.1'}]}, cb)`\n  - `cb(err, data)` -- cb merely returns the data that was passed.\n * `delete(domain[, key[, type]], cb)` -- delete all from a domain, a domain and key,\nor a domain a key and a type.\n\nLookup\n------\n\nIs a mechanism that given a store performs the common resolution pattern.\n\nGiven `example.com` previous added to a store:\n\n  * `www.example.com CNAME foo.bar.example.com.`\n  * `*.example.com A 127.0.0.1`\n\nA `Lookup(store, 'example.com', {name:'www.example.com', type:1}, cb)`\nwill resolve `www` to the CNAME and then search for `foo.bar.example.com` which\nwill return no results, and then search for `*.bar.example.com` which will also\nreturn no results, and ultimately searches for `*.example.com` which will return\nthe desired record.\n\nCallback will be called with `(err, results)` where results is an array suitable\nfor use in `Packet.answer`\n","readmeFilename":"README.md","_id":"native-dns-cache@0.0.2","dist":{"shasum":"ce0998f7fdf6c7990970a33190624b0e98ee959b","tarball":"https://registry.npmjs.org/native-dns-cache/-/native-dns-cache-0.0.2.tgz","integrity":"sha512-09HXHdb/updxfigaFbR53F8nCKqxM8WuHfTWBsusVlwSSZZ3qwWRdD6Kx2x8HBI1Q5IaycwcJOvBoXZWJNfVEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC29pz5iZsXt67a9OusXK/q46lbdSx3hXJ72zBSAUKKPwIhAOONIs8g10a1HSseZSmnQLzqZKyYTNw5nCPaZPRll4kS"}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":"tjfontaine@gmail.com"}]}},"readme":"Cache\n-----\n\nIf you perform a query on an A or AAAA type and it doesn't exist, the cache\nwill attempt to lookup a CNAME and then resolve that.\n\nThe constructor takes an optional object with the following properties:\n\n * `store` -- implements the cache store model (optional, default MemoryStore)\n\nMethods:\n\n * `lookup(question, cb)` -- for a given question check the cache store for\nexistence\n * `store(packet)` -- iterates over the resource records in a packet and sends\nthem to the cache store\n * `purge()` -- clears the cache store of all entries\n\nMemoryStore / Cache store model\n-------------------------------\n\n`MemoryStore(opts)` -- An in memory store based on a js object\n\nMethods:\n\n * `get(domain, key, cb)`\n  - `domain` is the holder under which keys will be applied,\n`key` is the subdomain that is being queried for.\nIf you `get('example.com', 'www', cb)` you are really asking for `www.example.com`.\n  - `cb(err, results)` -- results is an object of types and array of answers\n   * `{ 1: [{address: '127.0.0.1', ttl: 300, type: 1, class: 1}] }`\n * `set(domain, key, data, cb)`\n  - `domain` is the parent under which this key is stored.\n`key` is the subdomain we are storing, `data` is an object of types with an array of answers.\n   * `set('example.com', 'www', {1: [{class:1, type:1, ttl:300, address:'127.0.0.1'}]}, cb)`\n  - `cb(err, data)` -- cb merely returns the data that was passed.\n * `delete(domain[, key[, type]], cb)` -- delete all from a domain, a domain and key,\nor a domain a key and a type.\n\nLookup\n------\n\nIs a mechanism that given a store performs the common resolution pattern.\n\nGiven `example.com` previous added to a store:\n\n  * `www.example.com CNAME foo.bar.example.com.`\n  * `*.example.com A 127.0.0.1`\n\nA `Lookup(store, 'example.com', {name:'www.example.com', type:1}, cb)`\nwill resolve `www` to the CNAME and then search for `foo.bar.example.com` which\nwill return no results, and then search for `*.bar.example.com` which will also\nreturn no results, and ultimately searches for `*.example.com` which will return\nthe desired record.\n\nCallback will be called with `(err, results)` where results is an array suitable\nfor use in `Packet.answer`\n","maintainers":[{"name":"tjfontaine","email":"tjfontaine@gmail.com"}],"time":{"modified":"2022-06-20T20:47:05.164Z","created":"2013-03-24T03:31:06.832Z","0.0.1":"2013-03-24T03:31:08.140Z","0.0.2":"2013-03-25T00:15:05.518Z"},"author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"repository":{"type":"git","url":"http://github.com/tjfontaine/native-dns-cache.git"}}