New to caching in general and am enjoying the EhCache (2.4) User’s Manual (I couldn’t find 2.5).
Right off the bat there are some fundamental concepts that I’m just not finding the answer to anywhere in the manual or their website.
- Why should there ever be any more than 1 cache for an application? Are cache’s like
log4jloggers, where each class in your application should get its own logger? - Using EhCache lingo, what’s the difference between a
Cache(<cache>), and anEhcache(<ehcache>)? - Here’s a fun one: how do you pronounce EhCache?!? “Ay-cache”? “Ee-cache”?
Thanks in advance!
Different caches for different caching policies. You may want to cache small, static bits of data for a long time, in memory. Where as larger objects may have a shorter lifespan to limit memory overhead, maybe even caching to disk locally if fetching the data takes more time than reading from disk.
I believe EhCache is the interface you should program against, where as Cache happens to be an implementation of EhCache.
For me, I pronounce it E H Cache. Say the letters. By no means an definitive answer. 🙂