curl-library
Re: DNS caching - a documentation/implementation mismatch?
Date: Tue, 14 Feb 2006 00:31:37 +0100 (CET)
On Sun, 12 Feb 2006, Shmulik Regev wrote:
> My problem was that the request was SUCCESSFUL at least HTTP-wise. libcurl
> had no way of knowing the wrong server was picking up the request (due to
> some DNS tricks) and the connection persisted (such were my settings).
> However, the problem (as I see it) is that Curl_resolv_unlock (called by
> Curl_done) doesn't attempt to prune the cache.
I'm not so sure pruning should be done in unlock, since pruning can be quite
costly and there can be several unlocks done during a single request. I'd
rather try to limit it to just one pruning when the request is complete. Like
adding it in Curl_done() after the possible unlock has been done.
That should work equally fine for your case, shouldn't it?
> Thus adding a final statement to Curl_hostcache_prune should fix this issue.
I take it you meant Curl_resolv_unlock.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-02-14