Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure certain images will not be purged? #647

Closed
MilesV64 opened this issue Sep 5, 2024 · 0 comments
Closed

Ensure certain images will not be purged? #647

MilesV64 opened this issue Sep 5, 2024 · 0 comments

Comments

@MilesV64
Copy link

MilesV64 commented Sep 5, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant