I'm using Spring Boot version 2.0 for an application. Here we have used one third-party jar file which contains lots of entities. For improving the performance of an application, we really needs to do second level cache on those jar contained entities. Since we are using Hibernate in our application, we preferred EhCache
provider to implement second level cache.
Most of the websites provide examples with annotation @Cacheable
that is not usable in our application since we are using jar file entities that contains class files only that is not editable. so, it would really help a lot if someone provides the code for cache those jar file entities using xml and how to configure those entities in ehCacheManager.
Versions
- Hibernate v5.x +
- ehCache v2.x +
- Spring Boot v2.x +