mirror of
https://github.com/curl/curl.git
synced 2026-08-26 21:24:08 +03:00
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
This commit is contained in:
parent
d3299beec7
commit
8d7f402efb
9 changed files with 89 additions and 16 deletions
11
lib/hash.c
11
lib/hash.c
|
|
@ -255,11 +255,22 @@ curl_hash_clean(curl_hash *h)
|
|||
h->table = NULL;
|
||||
}
|
||||
|
||||
size_t
|
||||
curl_hash_count(curl_hash *h)
|
||||
{
|
||||
return h->size;
|
||||
}
|
||||
|
||||
void
|
||||
curl_hash_destroy(curl_hash *h)
|
||||
{
|
||||
if (!h) {
|
||||
return;
|
||||
}
|
||||
|
||||
curl_hash_clean(h);
|
||||
free(h);
|
||||
h = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue