From dd21ad076391d7ba88e7718aa0b9ec2c21deeec7 Mon Sep 17 00:00:00 2001 From: Seve <9214389@qq.com> Date: Fri, 24 Feb 2017 10:54:19 +0800 Subject: [PATCH] When 'request.baseUrl' changed, the cache is still valid. --- YTKNetwork/YTKRequest.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YTKNetwork/YTKRequest.m b/YTKNetwork/YTKRequest.m index 89ffc95..ccc2aa6 100644 --- a/YTKNetwork/YTKRequest.m +++ b/YTKNetwork/YTKRequest.m @@ -403,7 +403,7 @@ - (NSString *)cacheBasePath { - (NSString *)cacheFileName { NSString *requestUrl = [self requestUrl]; - NSString *baseUrl = [YTKNetworkConfig sharedConfig].baseUrl; + NSString *baseUrl = ([self baseUrl].length > 0) ? [self baseUrl] : [YTKNetworkConfig sharedConfig].baseUrl; id argument = [self cacheFileNameFilterForRequestArgument:[self requestArgument]]; NSString *requestInfo = [NSString stringWithFormat:@"Method:%ld Host:%@ Url:%@ Argument:%@", (long)[self requestMethod], baseUrl, requestUrl, argument];