From 16a01efa0398eef6d4c348789cc3baf8212acedf Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sat, 23 May 2020 13:27:04 -0700 Subject: [PATCH] add some resolver intro doc --- doc/resolver-caching.rst | 10 +++++++++- doc/resolver.rst | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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:: -- 2.47.3