Ehcache is a widely used java distributed cache for general purpose caching, 32 | Java EE and light-weight containers.
33 |The Ehcache integration is built on top of the ehcache and comes without any Ehcache 3rd party applications.
34 | Please refer to official Ehcache documentation if you need plugins.
To use Ehcache in your application download the zip bundle, 36 | decompress it and add the jars to the classpath.
37 |If you are using Maven then simply add to your pom.xml the following dependency:
then, just configure a cache element in your mapper XML files as follows:
50 | 51 |You can also provide values for parameters that can be modified dynamically at runtime:
57 | 58 |You may need to use a blocking cache. See the details here. 70 | This is how it is configured:
71 | 72 |Users that need to configure Ehcache through XML configuration file, have to put in the classpath the /ehcache.xml resource.
78 | Please refer to the official Ehcache documentation to know more details.
If the /ehcache.xml resource is not found or something goes wrong while loading it, the default configuration will be used.