diff options
author | Sterling Hughes <sterling@bumblebury.com> | 2002-01-07 20:52:32 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@bumblebury.com> | 2002-01-07 20:52:32 +0000 |
commit | 8d7f402efbcace85851c6bb8f6aa2452c15a9595 (patch) | |
tree | 4faf3a7b90bca33494801df5e0b58415d3ff39c3 /lib/url.c | |
parent | d3299beec734be02a781c393a994d525e3eaaac1 (diff) |
Make cach'ing work with threads now, there are now three cases:
- Use a global dns cache (via setting the tentatively named,
CURLOPT_DNS_USE_GLOBAL_CACHE option to true)
- Use a per-handle dns cache, by default
- Use a pooled dns cache when in the "multi" interface
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -284,6 +284,15 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) va_start(param, option); switch(option) { + case CURLOPT_DNS_USE_GLOBAL_CACHE: { + int use_cache = va_arg(param, int); + if (use_cache) { + Curl_global_host_cache_init(); + } + + data->set.global_dns_cache = use_cache; + } + break; case CURLOPT_SSL_CIPHER_LIST: /* set a list of cipher we want to use in the SSL connection */ data->set.ssl.cipher_list = va_arg(param, char *); |