Nuke
Nuke copied to clipboard
Is there a way to manually cache an image and ensure it does not ever get cleaned?
trafficstars
I'm having trouble figuring out how to use the normal caching for most urls while also needing to manually cache an image so it can be used throughout the app's UI and ensuring it never gets cleaned up. Is that possible, or would I need multiple different caches?
You would have to create a separate DataCache to some directory that won't be cleaned up automatically by the system, like documentDirectory. For "never gets cleaned up", you can probably set DataCache.sweepInterval to something absurdly high like Int.max but that's just a theory.