curl-library
Re: DNS cache size control
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 23 Apr 2002 16:53:46 +0200 (MET DST)
Date: Tue, 23 Apr 2002 16:53:46 +0200 (MET DST)
On Fri, 19 Apr 2002, Jacky Lam wrote:
> > I've added a patch to CVS which prunes old entries on each call to
> > Curl_resolv
> I have checked the CVS and look for your patch. It seems that your
> patch hasn't take care about the pointer referencing to DNS cache (e.g.
> conn->hostaddr) before you remove it. Will there be a problem?
This will be problems.
We MUST have a reference counter on all cache entries and dereference the
entry when we don't use it anymore. The cache pruning should then not prune
entries that are being referred.
This is not done right now, why this will have a minor risk of failing.
Especially if you set the caching time down to 1 second or so.
Thanks for your heads up Jacky!
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-04-23