From: Brian W. <bwe...@xb...> - 2002-11-12 19:31:46
|
On Tue, 12 Nov 2002, Enrico Fustinoni wrote: > Thank you for your response. > I=92m using 1.3.0 version.=20 > I think that the problem is due to the high number of different domain > in a very short time. So, the rate of new domain is greater than the > rate of domain removed from the cache. > I haven=92t seen all the dnsJava code jet, but I think that probably, a > max number of domain to be cached need to be introduced so that the max > amount of memory used by the application can be predetermined. Do you > think I=92m right? No, because the amount of memory per cached domain is not constant, so=20 limiting the cache based on the number of domains won't work as you'd=20 expect. The ultimate correct solution is to make the cache cleaner more=20 aggressive, and more likely to successfully clean the entire cache withou= t=20 getting an exception. This means that the cache would need a new data=20 structure. A good temporary solution would be to add a setMaxCache() function to the= =20 Cache object, like the setMaxNCache() function. Then you could set all=20 data to be cached for no more than, say, an hour, and the cache cleaner=20 would hopefully be able to remove more of it. In any case, I won't have time to touch dnsjava code at all for the next=20 few weeks. > In the next day, in my spare time, I=92ll try to better investigate the > problem. =20 OK. Brian |