Alamofire loading from cache even when cache policy set to ReloadIgnoringLocalAndRemoteCacheData

前端 未结 3 1782
难免孤独
难免孤独 2021-01-01 22:30

I set cache policy to request in Alamofire to ignore local cache.

Then I load a viewcontroller with network connection, then I disconnect network connection, kill th

3条回答
  •  清酒与你
    2021-01-01 22:55

    ReloadIgnoringLocalAndRemoteCacheData is not implemented.

    https://developer.apple.com/reference/foundation/nsurlrequestcachepolicy/1408722-reloadignoringlocalandremotecach

    http://nshipster.com/nsurlcache/

    Update: Starting with iOS 13, NSURLRequest.CachePolicy.reloadRevalidatingCacheData and NSURLRequest.CachePolicy.reloadIgnoringLocalAndRemoteCacheData are implemented. https://developer.apple.com/documentation/ios_ipados_release_notes/ios_13_release_notes

提交回复
热议问题