为什么 Spring 框架不赞成使用 Guava 缓存? [英] Why did Spring framework deprecate the use of Guava cache?
问题描述
我想用spring-cache和guava cache,但是我发现guava cache已经被spring官方文档标记为deprecated.不知道为什么,他们没有给出解释.
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.
推荐答案
Spring 项目决定支持切换到 咖啡因缓存.
Spring project decided to endorse a switch to Caffeine cache.
咖啡因取代Google Guava 库中的缓存支持,并积极维护独立形式的 Java 8+ 版本.
Caffeine supersedes the caching support in the Google Guava library with an actively maintained Java 8+ version in standalone form.
您可以在此处找到有关 Spring 跟踪器决策的相关问题:https://jira.spring.io/browse/SPR-13797
You can find the relevant issue with the decision on Spring's tracker here: https://jira.spring.io/browse/SPR-13797
spring framework github repo 中的相关提交是:https://github.com/spring-projects/spring-framework/commit/2bf9bc312ed1721b5978f88861c29cffc9ea407c
The relevant commit in spring framework github repo is: https://github.com/spring-projects/spring-framework/commit/2bf9bc312ed1721b5978f88861c29cffc9ea407c
这篇关于为什么 Spring 框架不赞成使用 Guava 缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!