Skip to content

Commit

Permalink
fix: autozone cache key (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn committed Jun 27, 2024
1 parent b9914f9 commit 69a65f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions QiniuSDK/Common/QNAutoZone.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ - (void)setDefaultZones:(NSArray <QNFixedZone *> *)zones {
- (QNZonesInfo *)getZonesInfoWithToken:(QNUpToken *_Nullable)token {

if (token == nil) return nil;
NSString *cacheKey = [self makeCacheKey:nil akAndBucket:token.index];
NSString *cacheKey = [self makeCacheKey:[QNConfiguration defaultConfiguration] akAndBucket:token.index];
QNZonesInfo *zonesInfo = nil;
@synchronized (self) {
zonesInfo = self.zonesDic[cacheKey];
Expand Down Expand Up @@ -247,7 +247,7 @@ - (NSString *)makeCacheKey:(QNConfiguration *)config akAndBucket:(NSString *)akA
}
hosts = [NSString stringWithFormat:@"%@:%@", hosts, host];
}
NSString *cacheKey = [NSString stringWithFormat:@"%@:%@", hosts, akAndBucket];
NSString *cacheKey = [NSString stringWithFormat:@"%@:%@", hosts, key];
return [QNUrlSafeBase64 encodeString:cacheKey];
}

Expand Down

0 comments on commit 69a65f7

Please sign in to comment.