Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 swift 和 iOS 开发完全陌生。我正在尝试做一个 webview 应用程序,我需要更新缓存,因为网站可以更改,但我还需要能够在离线时访问它。有没有我可以使用的预制缓存策略来实现这一点?
根据 Apple 开发支持成员的说法,NSURLCache was designed as a general purpose cache and doesn’t have the infrastructure needed to reliably support an offline mode. 这意味着如果你想创建一个离线模式,你必须自己实现缓存。
NSURLCache was designed as a general purpose cache and doesn’t have the infrastructure needed to reliably support an offline mode
来源:NSURLRequest.CachePolicy 线程