Does a background NSURLSesssion not populate the provided NSURLCache?
site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1527018760; bh=nMW9HzT6H6p89E3hPJ0Tl2hHgnCusfZWSs/n6qWJMEQ=; h=From:Subject:Date:To:From:Subject; b=rC8zSugp7K2a1wbtcokQfsOeXr6T7ko5jqf01bcs4zaCjdXezOjLZM8Ux2j7grlSYHLFE20DM09yHHI365eY40firnX4lo0MPie+VQiEni1ZjS0pJvn3QuU9r6XfpF+lxUkXt37notQBRrNCCeRmMUmVLd1AlnxsNFBKtoqilBid4Xa7GOaB+LnDlDtcpldv9EQBpVe+Ms5q991Sf2pOhWJVGz8d6eYpOE09Q9zRDjExbMAT6BkT2SZnrClaKUcj1NYBwiBNQFDYqxLEktwO32qqBH/vR0nBDJaDqAMWh5odvZ6lOaTCrUqwS0lXMn8/shqZymiuIlGtkQu/tlDvyQ== 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 (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists... This email sent to site_archiver@lists.apple.com
participants (1)
-
Sebastien Boisvert