Difference / Relationship between EhCache v2 and EhCache v3
Asked Answered
A

1

1

Recently I am doing some research about the performance of java local caches and, of course, I run into ehcache. As far as can see in the documentation and in the artifacts published in maven repository, it seems that there are two active development lines, version 2 and version 3. Furthermore, spring-boot include both in the super pom.

So, my question is: what is it that for? Do both chase the same objectives? What functionalities include version 3?

Thanks in advance!

Arthromere answered 7/11, 2017 at 17:22 Comment(0)
C
3

Version 3 is, as you would expect, the new version. Version 2 is still wildly used and for some time, version 3 was missing some features, including clustering. This is why Spring-Boot embed both.

Right now version 3 is the actively maintained and developed version. It should in fact be faster. It is also type-safe and JSR107 (JCache) compatible.

If this is not your experience, I am highly interested in seeing your benchmark.

Congou answered 10/11, 2017 at 2:51 Comment(1)
Thanks for the answer Henri! All clear. And yes, my benchmark points that normally Version 3 is faster than Version 2. I missunderstood the results. I have already edit the post. The only case that version 2 is faster than version 3 is when the capacity of the cache is the same as the number of the entry set of the cached method.Planchet

© 2022 - 2024 — McMap. All rights reserved.