Bug 27156 - Can not disable caching in NSUrlSessionConfiguration by passing null to URLCache
Summary: Can not disable caching in NSUrlSessionConfiguration by passing null to URLCache
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.6.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-17 15:06 UTC by An Ngo
Modified: 2015-02-18 19:36 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description An Ngo 2015-02-17 15:06:27 UTC
Hi,

The Apple docs say that we can pass nil to disable caching in NSUrlSessionConfiguration.(https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionConfiguration_class/index.html#//apple_ref/occ/instp/NSURLSessionConfiguration/URLCache). 

But when I pass null to URLCache property, the runtimes throw exception. I don't want the API to cache, because I have my own cache system.

The discussion thread: http://forums.xamarin.com/discussion/33358/how-to-disable-caching-in-nsurlsessionconfiguration-in-unified-api#latest
Comment 1 Sebastien Pouliot 2015-02-18 19:36:07 UTC
I reviewed the type and `nil` is also acceptable on two other properties (also fixed).
Thanks for the bug report!

Fixed in maccore/master 2af1894fce5132bfbf870432875fc69d110b8624