This has to be one of the more baffling things I've run into during my days of iOS development. I never in a million years thought that increasing the cache size even more would work. But for some reason, it did. And I still don't understand why at all. #iosdev 
Stack Overflow
Why does URLCache require diskCapacity & memoryCapacity to be much greater than the response to cache it?
I have the following code.
let customCache: URLCache = {
 let cacheSizeMemory = 512 * 1024 * 1024
 let cacheSizeDisk = 512 * 1024...