Jesus Ceawrote: > I have objects 50 bytes long, and 60Kbytes long :-(. I would > suggest to change the cache code to control cache size, instead of > object count. I played with this idea a little. It seems like the bookkeeping will get pretty complicated. Iterating over all objects in the cache to find the current size does not seem feasible, for performance reasons. Therefore, the cache would have to keep track of the total size as objects are added and removed. The fact that objects are weakly referenced by the cache futher complicates things. Maybe I'm missing a simple implementation but it doesn't appear to be worth the effort, IMHO. Regards, Neil