curl-library
Re: DNS cache size control
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 18 Apr 2002 10:18:50 +0200 (MET DST)
Date: Thu, 18 Apr 2002 10:18:50 +0200 (MET DST)
On Wed, 17 Apr 2002, Sterling Hughes wrote:
> I can also add a function to "prune" out these entries, so you would call
> (function name certainly not in stone :):
>
> curl_dns_clear(CURL *cp, int age);
>
> and it would prune all entries in cp->hostcache (which is, depending on
> your preferences, a local cache, multi-handle cache or a global cache) that
> are older than "age".
I don't think that's a very good idea.
Instead, I think that if your application wants to clean up more entries, the
timeout value should be lowered using CURLOPT_DNS_CACHE_TIMEOUT and we should
internally clean up then.
We should be very restrictive with adding new functions. IMHO.
Of course, I might be wrong.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-04-18