• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Does a background NSURLSesssion not populate the provided NSURLCache?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does a background NSURLSesssion not populate the provided NSURLCache?


  • Subject: Does a background NSURLSesssion not populate the provided NSURLCache?
  • From: Sebastien Boisvert <email@hidden>
  • Date: Tue, 22 May 2018 15:52:37 -0400

I have a need to make several requests for (small) resources and them be
populated into a local custom NSURLCache. I've setup a background session with
that URL cache set in its configuration, along with a delegate to handle the
delegate calls.

The whole process works as expected, except that I'm not seeing any delegate
calls to -URLSession:dataTask:willCacheResponse:.... when the task finishes; if
I switch the session to a 'normal' (shared) session, then I do get those calls.

I don't see any hints in the documentation or the headers about the behaviour
being different for a background session.

Do background sessions ignore the cache (with regards to populating it)? Do we
instead have to populate it ourselves?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Does a background NSURLSesssion not populate the provided NSURLCache?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Next by Date: Re: Does a background NSURLSesssion not populate the provided NSURLCache?
  • Next by thread: Re: Does a background NSURLSesssion not populate the provided NSURLCache?
  • Index(es):
    • Date
    • Thread