The requirement is to cache a large number (100,000 to 1,000,000) of small objects and control the expiration of individual objects based on future events. There is no time component to the expiration.
The cache must be available to a number of application servers (SpringSource dm Server) and ideally should be distributable and error tolerant itself.
I have been looking at Terracotta as a possible solution. Is that a good path to go down? Is there a better one?