At my company, we are very interested in using an open source caching solution, but there is great concern that variances in the actual size of objects or data cached will result in unmanageable or unpredictable memory usage by a cache.
Proper tuning of a cache should in theory be the answer, but our cautious CTO is looking for extra protection.
Most implementations seem to have caching expriy algorithms/policies based on max elements in the cache, but none I have seen allow a bounded memory constraint for a cache.
I was wondering if anyone has implemented a custom policy that will evict from a cache based on its size in memory?
We have this on the roadmap (http://jira.jboss.com/jira/browse/JBCACHE-11). This is for 1.4. If you are interested in helping out, contact Ben Wang.