NSURLCache does not respect diskCapacity
|Product:||iOS + SDK
NSURLCache does not respect the value of its `diskCapacity` property. Instead of limiting the on-disk cache to the specified size, it keeps growing uncontrollably, to the order of hundreds of megabytes or more.
Steps to Reproduce:
1. Set the `diskCapacity` property of `NSURLCache.sharedURLCache` to 10 * 1024 * 1024
2. Create http requests (using NSURLSession), downloading data.
3. Continue downloading data, checking the value of `NSURLCache.sharedURLCache.currentDiskUsage` after each response received.
`currentDiskUsage` should remain less than or equal to `diskCapacity`.
`currentDiskUsage` grows (far) beyond `diskCapacity`.
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!