EhCache3 In Memory Caching for Performance Improvement
If you are reading this you already know that caching is mechanism to store static data In-Memory for faster access and avoid expensive database calls or any kind of service calls to get the data. There are many ways to implement cache in java based applications, starting from very simple Map based caching to Apache Common JCS , EhCache , Apache Ignite , Hazelcast , Oracle Coherence and many more. Each of them have pros and cons. I will show how to use EhCache for caching implementation EhCache3 Implementation For this example you need to have following jars in the class path - <dependency> <groupId>org.ehcache</groupId> <artifactId>ehcache</artifactId> <version>3.4.0</version> </dependency> <dependency> <!-- We need this because ehcache uses slf4j for logging --> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.25</version>...
Comments
Post a Comment