0

我对 swift 和 iOS 开发完全陌生。我正在尝试做一个 webview 应用程序,我需要更新缓存,因为网站可以更改,但我还需要能够在离线时访问它。有没有我可以使用的预制缓存策略来实现这一点?

4

1 回答 1

0

根据 Apple 开发支持成员的说法,NSURLCache was designed as a general purpose cache and doesn’t have the infrastructure needed to reliably support an offline mode. 这意味着如果你想创建一个离线模式,你必须自己实现缓存。

来源:NSURLRequest.CachePolicy 线程

于 2021-03-17T12:31:55.407 回答