DNS caching in python2.2

Michael Fuhr mfuhr at fuhr.org
Sat Oct 30 07:12:11 CEST 2004

"Grimm, Garth" <garth.grimm at hp.com> writes:

> If I write a script that makes successive HTTP requests, using newly
> instantiated objects from urllib for each request, is there any reason
> to believe that the DNS resolution from the first call will be cached
> and used for the second call?

Cached where?  The DNS server you're querying probably caches the
results, but the resolver library the program uses might or might
not -- different systems behave differently.  You could use a packet
sniffer to find out how your system behaves.

Michael Fuhr

More information about the Python-list mailing list