diff --git a/library/src/main/java/com/qiniu/android/common/AutoZone.java b/library/src/main/java/com/qiniu/android/common/AutoZone.java index 4565950c..21f958ac 100644 --- a/library/src/main/java/com/qiniu/android/common/AutoZone.java +++ b/library/src/main/java/com/qiniu/android/common/AutoZone.java @@ -37,7 +37,7 @@ public final class AutoZone extends Zone { private static final SingleFlight SingleFlight = new SingleFlight<>(); private static final Cache zoneCache = new Cache.Builder(ZonesInfo.class) - .setVersion("v1.0.0") + .setVersion("v1") .builder(); //私有云可能改变ucServer @@ -188,7 +188,16 @@ private String makeCacheKey(String akAndBucket) { if (ucHosts == null || ucHosts.isEmpty()) { return akAndBucket; } - return UrlSafeBase64.encodeToString(ucHosts.get(0)+":"+akAndBucket); + + StringBuilder hosts = new StringBuilder(); + for (String host : ucHosts) { + if (host == null || host.isEmpty()) { + continue; + } + hosts.append(host).append(":"); + } + + return UrlSafeBase64.encodeToString(hosts+akAndBucket); } private RequestTransaction createUploadRequestTransaction(UpToken token) { diff --git a/library/src/main/java/com/qiniu/android/http/networkStatus/NetworkStatusManager.java b/library/src/main/java/com/qiniu/android/http/networkStatus/NetworkStatusManager.java index 9ef162ff..9ec112f1 100644 --- a/library/src/main/java/com/qiniu/android/http/networkStatus/NetworkStatusManager.java +++ b/library/src/main/java/com/qiniu/android/http/networkStatus/NetworkStatusManager.java @@ -11,7 +11,7 @@ public class NetworkStatusManager { private static final NetworkStatusManager networkStatusManager = new NetworkStatusManager(); private final Cache cache = new Cache.Builder(NetworkStatus.class) - .setVersion("v1.0.2") + .setVersion("v2") .setFlushCount(10) .builder(); diff --git a/library/src/main/java/com/qiniu/android/storage/serverConfig/ServerConfigCache.java b/library/src/main/java/com/qiniu/android/storage/serverConfig/ServerConfigCache.java index 7e306730..05e5b6d5 100644 --- a/library/src/main/java/com/qiniu/android/storage/serverConfig/ServerConfigCache.java +++ b/library/src/main/java/com/qiniu/android/storage/serverConfig/ServerConfigCache.java @@ -9,10 +9,10 @@ class ServerConfigCache { private static final String kServerUserConfigDiskKey = "ServerUserConfig"; private final Cache configCache = new Cache.Builder(ServerConfig.class) - .setVersion("v1.0.0") + .setVersion("v1") .builder(); private final Cache userConfigCache = new Cache.Builder(ServerUserConfig.class) - .setVersion("v1.0.0") + .setVersion("v1") .builder(); ;