From: Bob Halley Date: Sat, 23 May 2020 20:27:04 +0000 (-0700) Subject: add some resolver intro doc X-Git-Tag: v2.0.0rc1~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16a01efa0398eef6d4c348789cc3baf8212acedf;p=thirdparty%2Fdnspython.git add some resolver intro doc --- diff --git a/doc/resolver-caching.rst b/doc/resolver-caching.rst index 6bcc66df..f39b8ad9 100644 --- a/doc/resolver-caching.rst +++ b/doc/resolver-caching.rst @@ -3,7 +3,15 @@ Resolver Caching Classes ======================== -This is a placeholder. +The dnspython resolver does not cache by default, but caching can be +enabled by creating a cache and assigning it to the resolver's *cache* +attribute. If a cache has been configured, the resolver caches both +positive and negative responses. The cache respects the DNS TTL of +the data, and will not return expired entries. + +Two thread-safe cache implementations are provided, a simple +dictionary-based Cache, and an LRUCache which provides cache size +control suitable for use in web crawlers. .. autoclass:: dns.resolver.Cache :members: diff --git a/doc/resolver.rst b/doc/resolver.rst index 7068bd30..232ed66d 100644 --- a/doc/resolver.rst +++ b/doc/resolver.rst @@ -4,7 +4,11 @@ Stub Resolver ============= -This is a placeholder. +Dnspython's resolver module implements a "stub resolver", which does DNS +recursion with the aid of a remote "full resolver" provided by an ISP +or other service provider. By default, dnspython will use the full +resolver specifed by its host system, but another resolver can easily +be used simply by setting the *nameservers* attribute. .. toctree::