cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Proxy changes between transfers doesn't take effect immediately when using same handle

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 25 Apr 2016 23:28:39 +0200 (CEST)

On Mon, 25 Apr 2016, BoBo via curl-library wrote:

> One thing that still interests me is: is there some default expiration time
> for the cache? Because I don't see that issue if I wait for 2 minutes.

CURLOPT_DNS_CACHE_TIMEOUT

  Pass a long, this sets the timeout in seconds. Name resolves will be kept in
  memory and used for this number of seconds. Set to zero to completely
  disable caching, or set to -1 to make the cached entries remain forever. By default,
  libcurl caches this info for 60 seconds.

So yes, after 60 seconds it will do a new DNS resolve unless you change the
timeout.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-04-25