public List<DiscoveryUpstreamData> refreshCache(final String pluginSelectorName, final List<DiscoveryUpstreamData> upstreams) {
        List<DiscoveryUpstreamData> remove = cache.remove(pluginSelectorName);
        if (Objects.isNull(remove)) {
            return Collections.emptyList();
        }
        List<DiscoveryUpstreamData> discoveryUpstreamDataList = Optional.ofNullable(upstreams).orElse(new ArrayList<>());
        cache.put(pluginSelectorName, discoveryUpstreamDataList);
        Set<String> urlSet = discoveryUpstreamDataList.stream().map(DiscoveryUpstreamData::getUrl).collect(Collectors.toSet());
        return remove.stream().filter(r -> !urlSet.contains(r.getUrl())).collect(Collectors.toList());
    }
refreshCache.

@param pluginSelectorName pluginSelectorName
@param upstreams          upstreams
@return removeList
shenyu-protocol/shenyu-protocol-tcp/src/main/java/org/apache/shenyu/protocol/tcp/UpstreamProvider.java