- (NSString *)cacheFileName {
NSString *requestUrl = [self requestUrl]; //mobile/v2/lessons/getLiveList
NSString *baseUrl = [YTKNetworkConfig sharedInstance].baseUrl; //:http://xxxx.xxxx.com
id argument = [self cacheFileNameFilterForRequestArgument:[self requestArgument]];//自定义的参数字典,注意区别初始化时候的全局参数
NSString *requestInfo = [NSString stringWithFormat:@"Method:%ld Host:%@ Url:%@ Argument:%@ AppVersion:%@ Sensitive:%@",
(long)[self requestMethod], baseUrl, requestUrl,
argument, [YTKNetworkPrivate appVersionString], [self cacheSensitiveData]];
/*
Method:0 Host:http://xxxx.xxxx.com Url:/mobile/v2/lessons/getLiveList Argument:{
"custom_token" = 3427c8b6c691bf626d3dba38a38d1a42f46dd6f625fa68a71ef1cf8f1abd1be642ce8a845f1dc285b73899f9f5a6458f740ff27027dae5487e28733021c3a3df7c;
} AppVersion:4.4.0 Sensitive:(null)
*/
NSString *cacheFileName = [YTKNetworkPrivate md5StringFromString:requestInfo]; //b16fa65c226e7b37406352a1c018f975
return cacheFileName;
}
- 缓存目录:LazyRequestCache
/Users/xxxx/Library/Developer/CoreSimulator/Devices/A372E51E-B9C4-4FAE-9FE2-156614CE5C83/data/Containers/Data/Application/D0404C39-117D-45CD-BF9D-3F4E37CEF7A4/Library/LazyRequestCache
image.png
- 缓存文件路径
/Users/xxxx/Library/Developer/CoreSimulator/Devices/A372E51E-B9C4-4FAE-9FE2-156614CE5C83/data/Containers/Data/Application/D0404C39-117D-45CD-BF9D-3F4E37CEF7A4/Library/LazyRequestCache/fd9e06602224fd10a58c9aff0f39b0fc
网友评论