Node.js 缓存代理 dnscache
- 授权协议: BSD
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/yahoo/dnscache
- 官方下载: https://github.com/yahoo/dnscache
软件介绍
dnscache for Node 封装了 Node.js 的 dns 模块方法,在这之间提供缓存层。每个到 dns 方法的调用看起来都是本地缓存。dnscache 非常类似 GOF Proxy 设计模式,提供一个缓存代理。
dnscache 主要目标是缓存大部分 dns 调用,避免网络延迟,提升性能。
安装
npm install dnscache
使用
var dns = require('dns'),
dnscache = require('dnscache')({
"enable" : true,
"ttl" : 300,
"cachesize" : 1000
});
//to use the cached dns either of dnscache or dns can be called.
//all the methods of dns are wrapped, this one just shows lookup on an example
//will call the wrapped dns
dnscache.lookup('www.yahoo.com', function(err, result) {
//do something with result
});
//will call the wrapped dns
dns.lookup('www.google.com', function(err, result) {
//do something with result
});配置
enablettlcachesizecache
P3P Web隐私
克劳娜著、技桥译 / 克劳娜 / 清华大学出版社 / 2004-5 / 45.0
自万维网络中出现商业站点以来,基于Web的商业需求和用户的隐私权利之间就存在着不断的斗争。Web开发者们需要收集有关用户的信息,但是他们也需要表示出对用户隐私的尊重。因此隐私偏好工程平台,或者称之为P3P,就作为满足双方利益的技术应运而生了。 P3P由万维网协会研制,它为Web用户提供了对自己公开信息的更多的控制。支持P3P的Web站点可以为浏览者声明他们的隐私策略。支持P3P的浏览......一起来看看 《P3P Web隐私》 这本书的介绍吧!
