Support service discovery list backup. (#751)
Cache the service list data, if the Consul cluster is not available, use cache data to ensure that the service is highly available.
Can you describe the use case here? Both spring cloud loadbalancer and ribbon have caches for loadbalancing. If we decide to do this we should be consistent with s-c-lb https://github.com/spring-cloud/spring-cloud-commons/tree/main/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/cache
@spencergibb I found that the cache in the load balancer will be lost after a certain period of time. This is not the same as the purpose of my PR. Of course, we can modify the the load balancer cache to achieve the same purpose. I don't quite clear what other help do I do?
Oh...Is there anything unsuitable?
If the loadbalancer cache looses information, that should be fixed. I've marked #751 for discussion.
You can change the TTL of the cache to something very large here https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#loadbalancer-cache-configuration
Otherwise, if you think there is a bug in spring cloud loadbalancer, open an issue in https://github.com/spring-cloud/spring-cloud-commons/issues