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

**URL:** <https://forums.kodeco.com/t/networking-with-urlsession-part-6-download-and-ray-wenderlich/27392>\
**Category:** 🎓 Courses & Articles\
**Created:** [March 21, 2017, 3:06pm UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-6-download-and-ray-wenderlich/27392 "2017-03-21T15:06:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [March 21, 2017, 3:06pm UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-6-download-and-ray-wenderlich/27392/1 "2017-03-21T15:06:01Z")

</div>

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](https://www.raywenderlich.com/3986-networking-with-urlsession/lessons/6)

---

<div class="post-metadata">

**Author:** ![hegazy](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hegazy/32/101666_2.png) [@hegazy](https://forums.kodeco.com/u/hegazy)\
**Post date:** [October 25, 2017, 1:07pm UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-6-download-and-ray-wenderlich/27392/2 "2017-10-25T13:07:35Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [October 26, 2017, 4:22am UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-6-download-and-ray-wenderlich/27392/3 "2017-10-26T04:22:04Z")

</div>

the benefit happens automatically, if the server response includes expiration and validation info; for example, see [HTTP caching - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching) — 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](https://developer.apple.com/documentation/foundation/url_loading_system/accessing_cached_data)
