curl-library
Re: DNS caching - a documentation/implementation mismatch?
Date: Mon, 13 Feb 2006 22:08:10 +0100 (CET)
On Mon, 13 Feb 2006, Shmulik Regev wrote:
> The prune call should only affect the stale cached entries. Note that the
> prune function is already called in other scenarios through the
> Curl_disconnect function.
Yes, it does sound like the correct thing to do. Haven't had any time to check
or try your patch yet.
> At least in my case I wanted to disabled caching altogether and the call
> should simply clear the cache. Unfortunately when the connections themselves
> are cached, disconnect is not called (obviously) and stale entries stay
> active.
Right. It would be slightly more involved to make that effect go away.
> It just occurred to me that another option (which looks slightly more
> complicated) would be to check whether the entries have timed-out when
> trying to retrieve them from the cache. This lazy pruning might actually
> work better when the cache lifetime is greater than zero.
Yeah, I agree we could do that indeed. Shouldn't be too much work.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-02-13