iOS网络请求的一个小坑

2017-07-05  本文已影响51人  土b兰博王
@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy;
typedef NS_ENUM(NSUInteger, NSURLRequestCachePolicy)
{
    NSURLRequestUseProtocolCachePolicy = 0,

    NSURLRequestReloadIgnoringLocalCacheData = 1,
    NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4, // Unimplemented
    NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData,

    NSURLRequestReturnCacheDataElseLoad = 2,
    NSURLRequestReturnCacheDataDontLoad = 3,

    NSURLRequestReloadRevalidatingCacheData = 5, // Unimplemented
};

设置为NSURLRequestReloadIgnoringLocalAndRemoteCacheData,解决!

上一篇 下一篇

猜你喜欢

热点阅读