httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Rooney <roo...@electricjellyfish.net>
Subject Re: Hash table growth
Date Tue, 16 Aug 2005 01:47:38 GMT
Jem Berkes wrote:
> When I looked at the expand function used by apr_hash.c it looked to me 
> like it keeps growing if you keep using 'set' with novel values. I was 
> thinking of using apr_hash in order to cache DNSBL queries for my module. 
> It would ensure rapid cache search but I am having trouble figuring out how 
> I could remove existing entries. I really _want_ collisions to happen but 
> I'm not sure if this is possible.
> 
> Any tips on how I can overwrite existing entries in the hash table, rather 
> than keep expanding the table entries?

As is documented in apr_hash.h, you can remove entries from an 
apr_hash_t by setting the value for the key in question to NULL.

-garrett

Mime
View raw message