-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
storeCachedData: callback once stored in cache #750
Comments
If you are using the built-in |
i believe i am, but i'm noticing a slight delay. my flow is
the image shows up black (i.e., i think it fails to load). if i dismiss the modal, then re-present it, i think it works. so likely, there's something with threading/waiting for the staging area to accept the value before i try to fetch it is there some way i can syncronize that? by submitting the logic to present the modal to a certain thread, or waiting for a notification to fire? |
Hey, can you please share the code that you are using? There is a public API: |
#755 is how i'm using the API. from running the test i just wrote, it looks like it doesn't result in a cache hit |
solved by the PR |
hey, i was using the 2 APIs
ImagePipeline.shared.cache.storeCachedData(imageData, for: ImageRequest(url: remoteURL)
+ImagePipeline.shared.loadImage(with: url)
.i'm using them in pretty quick succession, when a user captures an image that is being uploaded. i'd like to await the completion of
storeCachedData
before i allow the call toloadImage
, but afaict there's no callback/notification once the cached image has been saved. the 2 objects that make the calls are quite disconnected, and i'd prefer to not have them depend on oneanother.how can i ensure that i don't make that
loadImage
call untilstoreCachedData
has made the imageData available in the cache?The text was updated successfully, but these errors were encountered: