Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 使用缓存并嵌入spring引导和redis_Spring Boot_Caching_Redis - Fatal编程技术网

Spring boot 使用缓存并嵌入spring引导和redis

Spring boot 使用缓存并嵌入spring引导和redis,spring-boot,caching,redis,Spring Boot,Caching,Redis,我想使用SpringBoot来缓存从RESTWeb服务检索到的数据。 我建议使用redis来缓存数据。是否可以在不安装redis软件的情况下使用带spring boot的嵌入式redis? 如果是,使用哪个版本的spring boot以及如何执行 感谢您的回复。Redis无法满足您的要求 当然,您可以在Spring Boot应用程序中简单地使用嵌入式EhCache。如果要共享缓存,这取决于您的体系结构。您可以公开REST端点以使缓存可供其他应用程序使用 您可以参考: Spring使用注解@Ena

我想使用SpringBoot来缓存从RESTWeb服务检索到的数据。 我建议使用redis来缓存数据。是否可以在不安装redis软件的情况下使用带spring boot的嵌入式redis? 如果是,使用哪个版本的spring boot以及如何执行


感谢您的回复。

Redis无法满足您的要求

当然,您可以在Spring Boot应用程序中简单地使用嵌入式
EhCache
。如果要共享缓存,这取决于您的体系结构。您可以公开REST端点以使缓存可供其他应用程序使用

您可以参考:


Spring使用注解
@EnableCaching
来启用或禁用缓存。此外,还有四个注释,如
@Cacheable
@cacheexecute
,用于自定义缓存逻辑。

Hazelcast支持您尝试实现的方案。它有一个嵌入式缓存的概念,可以跨服务节点共享/同步

有关更多详细信息,请参阅:


没有这样的事吗?所有嵌入式redis框架都是用于集成测试的。使用内存中的缓存解决方案如果您想要更多的缓存控制,如TTL,可以使用一些更详细的Ehcache。谢谢Darren!因此,使用Ehcache,可以在不安装任何软件的情况下使用cache。我想知道ehcache是否提供了启用和禁用缓存的可能性?