Ehcache API Developer Guide : The JCache (JSR-107) Cache Provider : Using Ehcache as a JCache Provider
Using Ehcache as a JCache Provider
To use JCache API calls in an application, you require both of the following jar files:
*The JCache jar, which defines the JCache APIs.
*The Ehcache jar, which is the caching provider jar that implements the JCache APIs. It translates the JCache API calls to their Ehcache API equivalent.
You can use the JCache API to develop a complete application, without the need to use any Ehcache API calls. For advanced users, the JCache cache.unwrap method allows you to access the underlying Ehcache structures.
Setting up Ehcache as the Caching Provider for JCache
To use Ehcache as the caching provider for your application, add the files ehcache-3.x.x.jar (where x.x is a version-dependent string) and javax.cache:cache-api:1.y.y.jar (where y.y is a version-dependent string) to your application's classpath. No other setup steps are required.
The Ehcache jar file is contained in the product distribution. The JCache jar file is available as a download from the JSR-107 section of the web pages of the Java Community Process.
Note:  
If you were already using JCache with another caching provider, ensure that you remove the other provider's jar file before starting your application.
Copyright © 2010-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback