如何删除 Spring 云配置服务器缓存
How to remove Spring Cloud Config Server cache
有没有办法在使用 Git 后端时删除保存在配置服务器中的缓存?配置合并到目标分支后,配置服务器需要一些时间才能获取更改。
Config Server 似乎有一个本地缓存和大约 1 或 2 分钟的轮询时间。这不好,因为必须等待未定义的时间才能重新部署应用程序以获取最新配置。
谢谢。
您可以使用 force-pull
属性。它将立即重新加载配置。
sring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
force-pull: true
有没有办法在使用 Git 后端时删除保存在配置服务器中的缓存?配置合并到目标分支后,配置服务器需要一些时间才能获取更改。
Config Server 似乎有一个本地缓存和大约 1 或 2 分钟的轮询时间。这不好,因为必须等待未定义的时间才能重新部署应用程序以获取最新配置。
谢谢。
您可以使用 force-pull
属性。它将立即重新加载配置。
sring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
force-pull: true