cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: caching name resolved info?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 2 Nov 2001 11:44:30 +0100 (MET)

On Thu, 1 Nov 2001, Dirk Manske wrote:

> > What would be the pros and cons for libcurl to cache/store name info for
> > already resolved host names?
>
> Name caching is a good and usefull idea. But disabling of this feature
> should be possible, because round robin dns.

Round robin DNS should not be a problem because...

> Maybe curl should caching all ip of a hostname and implementing an
> internal round robin.

...curl already gets all the IPs and (in 7.9.1) tries them all one by one
when connecting. We could perhaps come up with a system to make repeated
connects try the IPs in different order.

> And the name cache should be flushable.

It should indeed. The names should only be held in the cache for a specified
time as otherwise libcurl won't notice changes in the DNS if the same libcurl
handle is kept alive for a very long time.

This kind of cache would be a perfect function for someone else than me to
write. Anyone? Pretty please?

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-11-02