1

I have checked Jcache specification and my understanding is that it gives you more flexibility in terms of loading and removing objects from the cache but you have to write your own data access.

Hibernate L2 cache is great to cache data from RDBMS but provides limited flexibility in terms of populating and eviction.

Can the best of both functionalities be used together to avoid data access in Jcache implementation for implementation eg Ignite which can cater to both specifications.

to be more precise can the single cache object created by Ignite be treated as Hibernate L2 cache and Jcache simultaneously.

I want to use the Jcache annotation and use hibernate for datatabase operations if needed

Hulk
  • 152
  • 3
  • 10

2 Answers2

9

Hibernate 5.x has built-in support of JCache as L2 cache provider! In this case, you don't need to stick to any proprietary integration APIs and use any JCache implementations.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
Vik Gamov
  • 5,446
  • 1
  • 26
  • 46
1

Yes, Ignite has native Hibernate support, see https://apacheignite.readme.io/docs/hibernate-l2-cache

Pavel Tupitsyn
  • 8,393
  • 3
  • 22
  • 44
  • Can i treat the same cache instance as Jcache compliant and Hibernate treat it as L2 cache ? – Hulk Sep 14 '16 at 12:27