cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: CURLOPT_DNS_CACHE_TIMEOUT and DNS queries

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 22 Apr 2011 22:14:58 +0200 (CEST)

On Wed, 20 Apr 2011, Pankaj Takawale wrote:

>> How do you turn off the caching?
>
> I set curl option CURLOPT_DNS_CACHE_TIMEOUT to 0.

You see, the reason I asked this is that there's really no such thing as
"disabling the DNS cache" within libcurl. You can set the timeout value to
different values, and by setting it to 0 it should effectively take away the
chances that an entry would be removed. But setting it to 2 or 20 or 200
doesn't change the logic, it is still the same code that avoids re-use and
pruning of old entries. Thus, if the logic works for 0 seconds, there's
nothing immediate that stands out and make other values not work.

Do you think you can help us and come up with a way for us to repeat this
problem?

Alternatively, if you have an easy way to do this in your own environment, I
suggest you debug the code in lib/hostip.c and try to figure out how this
problem can occur!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-22