I need to use cache solution in my project.
I've used jcs and looks pretty good, but I read that its library is base开发者_StackOverflowd on jdk1.3 spec.
Ehcache looks another good choice too.
Which library should I use, apache jcs, ehcache or other?
I've used EhCache successfully in the past. Very easy to configure and use, provide good performance and easy ways to monitor the content of your cache.
Without telling us more about what exactly you want to cache, it's difficult to give more details.
You could also consider using some O/RM solution (Hibernate comes to mind) if you need caching between your Java domain objects and your database schema.
If you don't need a distributed cache, just a simple in-memory cache, Google Guava providers cache-semantics Map implementations.
精彩评论