NSURLCACHE policy to update cache data if website is reachable and so always load cache

74 Views Asked by At

I'm totally new to swift and iOS development. I'm trying to do a webview app and i need to update the cache because the website can change but i also need to be able to access it while offline. Is there any premade cache policy i can use in order to accomplish that ?

1

There are 1 best solutions below

0
On

According to Apple dev support member, NSURLCache was designed as a general purpose cache and doesn’t have the infrastructure needed to reliably support an offline mode. Which means if you want to create an offline mode, you must implement caching yourself.

Source: NSURLRequest.CachePolicy thread