PINRemoteImage icon indicating copy to clipboard operation
PINRemoteImage copied to clipboard

Ensure certain images will not be purged?

Open MilesV64 opened this issue 1 year ago • 0 comments

Is there a way to save an image to the cache and ensure it will not be cleared?

My use case is that my app uses PINRemoteImage for lots of image views in the app. When the user uploads an image, it would be nice if I can just store the image in the cache immediately for use in the UI while server uploads happen in the background. I'd use PINRemoteImageManager.shared().insertImageData(intoCache: data, with: url, processorKey: nil, additionalCost: 0).

My app supports offline mode, queuing uploads once the user gets internet. If they quit the app while offline or just scroll through the app while offline, that could be a long time and there's a chance that the image would be removed from the pin cache.

Is there any way to use the library for this use case while ensuring it won't be deleted?

MilesV64 avatar Sep 05 '24 20:09 MilesV64