YTKNetwork
YTKNetwork copied to clipboard
loadCacheMetadata
获取缓存 这个方法总是返回NO ???
/// The max time duration that cache can stay in disk until it's considered expired. /// Default is -1, which means response is not actually saved as cache.
- (NSInteger)cacheTimeInSeconds; //检测一下这个参数是否设置了
/// @return Whether cache is successfully loaded.
- (BOOL)loadCacheWithError:(NSError * __autoreleasing *)error; //可以使用这个检测哪里出错了 @miaoruiyuan
@webMing cacheTimeInSeconds 设置确认没问题
error Domain=com.yuantiku.request.caching Code=-6 "Invalid metadata. Cache may not exist" UserInfo={NSLocalizedDescription=Invalid metadata. Cache may not exist}
想知道问题出在哪?谢谢
你的cacheTimeInSeconds 设置的是多少?把代码片段贴一些ok?
我也是,不知道什么原因。
@FlyingCaiChong 好像responseObject 必须是NSData类型