我有一个 Spring Boot Web 应用程序并使用带有 redis 存储的 spring 会话。Web 请求有时需要缓存它们的响应(以避免不必要的数据库旅行),我计划使用 Caffeine。
然而,似乎 Redis 接管了(只要我包含 gradle 依赖项)作为缓存实现,因为我为咖啡因设置的所有 TTL 都被忽略了。
在 Spring Boot 应用程序中使用超过 1 个缓存提供程序是否可能/值得推荐?我可以尝试将 Redis 用于所有缓存,只是担心它会影响 Spring Boot 附带的会话实现(我没有配置任何东西,只是使用了@EnableRedisHttpSession)。
我很感激对此的任何建议。