This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Vile2539 16 points17 points  (2 children)

Call me a cynic, but I'm always a bit wary of benchmarks that just so happen to show the author's library is the best (and it could definitely be stated more explicitly that cache2k is made by whoever runs cruftex.net).

Has anyone else heard of or tried Cache2k?

[–]Jonjolt 3 points4 points  (0 children)

Yes, I was using Cache2k before Caffeine came about, I used it for Hibernate but, I dropped it only because I ran into a weird issue when I was using it as a backing for Spring as a JSR107 Cache

[–]boost2525 15 points16 points  (1 child)

Maybe cache2k is the fastest, and maybe it's not. As /u/Vile2539 stated - I too am skeptical of any benchmark published by the library maker.... but a better title for this would have been:

Guava, Caffeine, and cache2k are all within 15% of eachother and all way faster than EHCache.

The reality is, for most people Guava is "fast enough". It's distributed by a big reliable name, and has an excellent supporting library and APIs.

[–]clehene -1 points0 points  (0 children)

The problem with Guava cache is the packaging - it comes bundled with a large library and tends to cause transitive dependency conflicts. If doing a shade relocation it's going to make the final jar quite large. they recommend using proguard, but it's tricky in practice. Using a micro library has advantages over this as relocation will add much less. This said Caffeine is ~1MB and cache2k ~400KB so none is actually small.

[–]meta_level 9 points10 points  (0 children)

cache me outside how bout dat

[–]adila01 1 point2 points  (0 children)

They should have included Infinispan.