mengying.ye
mengying.ye

Reputation: 877

Why did Spring framework deprecate the use of Guava cache?

I want to use spring-cache with guava cache, but I find guava cache has been marked deprecated by spring official document.I wonder to know why, they didn't give some explanations.

https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-caching.html#boot-features-caching-provider-guava

Upvotes: 30

Views: 28562

Answers (1)

Giorgos Gaganis
Giorgos Gaganis

Reputation: 685

Spring project decided to endorse a switch to Caffeine cache.

Caffeine supersedes the caching support in the Google Guava library with an actively maintained Java 8+ version in standalone form.

You can find the relevant issue with the decision on Spring's tracker here: https://github.com/spring-projects/spring-framework/issues/18370 (SPR-13797)

The relevant commit in spring framework github repo is: https://github.com/spring-projects/spring-framework/commit/2bf9bc312ed1721b5978f88861c29cffc9ea407c

Upvotes: 45

Related Questions