Chinaunix首页 | 论坛 | 博客
  • 博客访问: 926585
  • 博文数量: 146
  • 博客积分: 3321
  • 博客等级: 中校
  • 技术积分: 1523
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-29 10:32
文章分类

全部博文(146)

文章存档

2014年(2)

2013年(5)

2012年(4)

2011年(6)

2010年(30)

2009年(75)

2008年(24)

分类:

2010-08-12 15:35:39

RFC中关于缓存的内容,个人做了一个粗略的翻译,留下来做个参考。

RFC1035

7.4. Using the cache(使用缓存)

In general, we expect a resolver to cache all data which it receives in responses since it may be useful in answering future client requests. However, there are several types of data which should not be cached:

    一般来说,我们期望解析器可以吧所有他们在响应中收到的数据缓存起来,已备为将来客户端的请求服务。但是,也有一些数据时不会被缓存起来的:

  • When several RRs of the same type are available for a particular owner name, the resolver should either cache them all or none at all. When a response is truncated, and a resolver doesn't know whether it has a complete set, it should not cache a possibly partial set of RRs.
  • 当一些同类型的资源记录对一个特殊的名字可用时,解析器应该将他们全部缓存或者全部不存。当一个响应被截断之后,解析器不知道这个数据是否是完全的,那么他将不会缓存这些可能的部分数据。

 

  • Cached data should never be used in preference to authoritative data, so if caching would cause this to happen the data should not be cached.
  • 缓存的数据不能优先于权威域名被使用,如果缓存之后可能引起这种情况,那么这个数据将不会被缓存。

 

  • The results of an inverse query should not be cached.
  • 反向解析的数据不能拿来缓存。

 

  • The results of standard queries where the QNAME contains "*" labels if the data might be used to construct wildcards. The reason is that the cache does not necessarily contain existing RRs or zone boundary information which is necessary to restrict the application of the wildcard RRs.
  • 当标准查询的结果中的QNAME包含*时,这个数据可能是用于通配符查询。这个结果中包含的数据缓存起来是没有必要的,因为这个资源记录或者区域边界信息对限制通配符查询结果是没有必要的。
  • RR data in responses of dubious reliability. When a resolver receives unsolicited responses or RR data other than that requested, it should discard it without caching it. The basic implication is that all sanity checks on a packet should be performed before any of it is cached.
  • 响应信息中的资源记录的可靠性存在问题。当解析器接收到未经请求而返回的资源记录时,他应该抛弃他,不放入缓存中。这也表明缓存任何信息之前应该对他进行智能的检验。

In a similar vein, when a resolver has a set of RRs for some name in a response, and wants to cache the RRs, it should check its cache for already existing RRs. Depending on the circumstances, either the data in the response or the cache is preferred, but the two should never be combined. If the data in the response is from authoritative data in the answer section, it is always preferred.

    类似的,当一个解析器在一个响应数据中得到对一些名字有一系列资源记录,并且想要缓存他时,他应该去检查缓存中是否已经存在相应的记录。基于这种情况,无论是响应信息中的或者是缓存中的数据都是优先的,但是这两个永远不能联合起来。如果响应中的数据是来自权威域名服务器的话,那么他始终是优先的。
阅读(1121) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~