Skip to content

Commit 69a65f7

Browse files
authored
fix: autozone cache key (#447)
1 parent b9914f9 commit 69a65f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

QiniuSDK/Common/QNAutoZone.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ - (void)setDefaultZones:(NSArray <QNFixedZone *> *)zones {
9292
- (QNZonesInfo *)getZonesInfoWithToken:(QNUpToken *_Nullable)token {
9393

9494
if (token == nil) return nil;
95-
NSString *cacheKey = [self makeCacheKey:nil akAndBucket:token.index];
95+
NSString *cacheKey = [self makeCacheKey:[QNConfiguration defaultConfiguration] akAndBucket:token.index];
9696
QNZonesInfo *zonesInfo = nil;
9797
@synchronized (self) {
9898
zonesInfo = self.zonesDic[cacheKey];
@@ -247,7 +247,7 @@ - (NSString *)makeCacheKey:(QNConfiguration *)config akAndBucket:(NSString *)akA
247247
}
248248
hosts = [NSString stringWithFormat:@"%@:%@", hosts, host];
249249
}
250-
NSString *cacheKey = [NSString stringWithFormat:@"%@:%@", hosts, akAndBucket];
250+
NSString *cacheKey = [NSString stringWithFormat:@"%@:%@", hosts, key];
251251
return [QNUrlSafeBase64 encodeString:cacheKey];
252252
}
253253

0 commit comments

Comments
 (0)