Fix bug where requests with processors would not check disk cache for original image data
TaskFetchOriginalData will now check the disk cache for the original image data before making a network request.
To fix https://github.com/kean/Nuke/issues/837. Please let me know if you'd like me to take a different approach. Thank you!
Closing because I think I found a better solution.
Reopening for now, realized the other approach has some drawbacks.
The change that I've actually started using in my own app is to allow the pipeline delegate to provide unique custom keys for both the memory and disk caches. The setup I have is only disk cache the original image data (so key is just URL). The memory cache keys continue to be a function of both URL and thumbnail options to leverage already in-memory downsampled images. I also have a custom image decoder powered by UIImageReader that can generate thumbnail sized variants given the original image data, hence disk caching only the original image data. With this configuration, I don't need the change in this PR but I wonder if it's a good thing to keep anyways.
The overall thought is that disk caching should only have unique keys for steps that are post-decode. thumbnail options on the other hand are a decode-time operation in which case they can simply share disk cache entries with requests that have no thumbnail options.
Hey, thanks for raising the issue and for the extended details. I'm working on redesigning and simplifying the tasks for Nuke 13 – I'll address this as part of the rework.