W
Wendy Smoak
I'm trying to cache objects that are expensive to load from the database,
but I need the 'visible' object to be a Map so I can use it with JSTL.
I set about extending AbstractMap and the 'get' method was easy, but I got
stuck on the 'entrySet' method. The cache I'm using does not expose its
underlying Map, which I understand... but I need that entrySet! The
developers seem interested in working on it, so maybe they'll come up with a
solution.
Meanwhile, does anyone know of a good Java-based object cache that can
answer the question "What's in the cache" at any point in time?
Alternately, I could live with a Map that empties itself at midnight. Or
something that I could schedule in Tomcat to replace a couple of context
attributes with empty maps. I'm open to suggestions...
Some code and notes as I work through this are posted here:
http://wiki.wendysmoak.com/cgi-bin/wiki.pl?WhirlyCache
but I need the 'visible' object to be a Map so I can use it with JSTL.
I set about extending AbstractMap and the 'get' method was easy, but I got
stuck on the 'entrySet' method. The cache I'm using does not expose its
underlying Map, which I understand... but I need that entrySet! The
developers seem interested in working on it, so maybe they'll come up with a
solution.
Meanwhile, does anyone know of a good Java-based object cache that can
answer the question "What's in the cache" at any point in time?
Alternately, I could live with a Map that empties itself at midnight. Or
something that I could schedule in Tomcat to replace a couple of context
attributes with empty maps. I'm open to suggestions...
Some code and notes as I work through this are posted here:
http://wiki.wendysmoak.com/cgi-bin/wiki.pl?WhirlyCache