posted 17 years ago
Hi, welcome to the ranch!
A HashMap is usually pretty good for this.
Synchronization is a concern with multi-threaded systems. I usually just synchronize the get & put methods on the cache, keep the map completely private, never let anybody else see an iterator or keyset or valueset.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi