Ehcache can be used directly. It can also be used with the popular Hibernate Object/Relational tool. Finally, it can be used for Java EE Servlet Caching.
This quick guide gets you started on each of these. The rest of the documentation can be explored for a deeper understanding.
See Code Samples for more information on direct interaction with ehcache.
See Hibernate Caching for more information.
See Java EE Servlet Caching for more information.
Ehcache contains an early draft implementation of JCache contained in the net.sf.ehcache.jcache package.
See the JSR107 chapter for usage.
Usually, with these, you are using ehcache without even realising it. The first steps in getting more control over what is happening are: