Does a background NSURLSesssion not populate the provided NSURLCache?
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