NSURLCache

NSURLCache provides a composite in-memory and on-disk caching mechanism for URL requests to your application. As part of Foundation’s URL Loading System, any request loaded through NSURLConnection will be handled by NSURLCache.

nshipster.com/nsurlcache/

NSURLCache is the built-in, automatic HTTP(S) cache used by NSURLConnection, NSURLSession (default/ephemeral configs), and WKWebView.

Key points:

Bottom line: two lines at startup give you free, fast, offline-capable networking. Don’t reinvent caching.


Category:

Year: