Networking with URLSession - Part 6: Download and | Ray Wenderlich

Learn about URLSessionDownloadTask and URLSessionUploadTask to save results to a file, or upload a data object or a file.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3986-networking-with-urlsession/lessons/6

Hi audrey,
Thanks for your effort , i just wonder how to use the caching that it returns
from response , How can i get the caching and how can i benefit from this ?

the benefit happens automatically, if the server response includes expiration and validation info; for example, see HTTP caching - HTTP | MDN β€” using the default cache control policy, your app uses the cached version if it’s still valid.

For direct access to the cached data, see Apple Developer Documentation