mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
hostip: do DNS cache pruning in milliseconds
Instead of using integer seconds. Also: if the cache contains over 30,000 entries after first pruning, it makes anoter round and removes all entries that are older than half the age of the oldest entry until it goes below 30,000. Closes #18160
This commit is contained in:
parent
be71475b13
commit
854b0e230c
6 changed files with 51 additions and 45 deletions
|
|
@ -67,7 +67,7 @@ struct Curl_dns_entry {
|
|||
struct Curl_https_rrinfo *hinfo;
|
||||
#endif
|
||||
/* timestamp == 0 -- permanent CURLOPT_RESOLVE entry (does not time out) */
|
||||
time_t timestamp;
|
||||
struct curltime timestamp;
|
||||
/* reference counter, entry is freed on reaching 0 */
|
||||
size_t refcount;
|
||||
/* hostname port number that resolved to addr. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue