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

Is there a way to manually cache an image and ensure it does not ever get cleaned? #812

Open
MilesV64 opened this issue Sep 6, 2024 · 1 comment

Comments

@MilesV64
Copy link

MilesV64 commented Sep 6, 2024

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?

@LePips
Copy link
Contributor

LePips commented Dec 26, 2024

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.

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

2 participants