[英]How to disable caching in spring boot
I am caching my data in redis using spring caching abstraction. 我正在使用Spring缓存抽象将数据缓存在Redis中。 Is there any way to disable caching through application.properties file.
有什么方法可以禁用通过application.properties文件进行缓存。 I tried using
spring.cache.type=none
, but it didn't worked. 我尝试使用
spring.cache.type=none
,但是没有用。
I know if I remove @EnableCaching
, it will disable caching, but is there any other way to do this without changing the code 我知道如果删除
@EnableCaching
,它将禁用缓存,但是还有其他方法可以执行此操作而无需更改代码
Try to put following variable in your properties file: 尝试在属性文件中放置以下变量:
rediscache=disable
Hope it will help. 希望它会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.