-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Some offline cached images not loading offline #1145
Comments
This image is likely conditionally cached which requires an HTTP request to the remote server which returns a 304 allowing us to use the disk cached version. Without internet connection, the freshness of the locally cached image cannot be verified and thus the underlying HTTP client returns an error.
This is how |
Thank you, why does it work with NetworkPolicy OFFLINE then ? |
Because it requests the image locally from the cache, even if the HTTP On Mon, Sep 21, 2015, 9:50 PM Patric Corletto notifications@github.com
|
So there should probably be a NetworkPolicy that allows taking it offline if available and otherwise do a network requests. I saw tons of people reporting this issue. And the workaround is pretty annoying. |
+1 |
This logic worked for me:
|
Hello there!
I'm having a weird issue... Some images will not load while being offline even if they are cached.
Only after turning online the images will appear - but with a blue indicator (disk).
This happens only for a few images...
The onError callback is triggered for the images that are not loaded.
With the approach above the images will load - but I have problems with the first and only the first image of a gridview. I already saw other similar problems on stackoverflow that local cached images are not loaded without the OFFLINE flag.
Also I saw that the first image of the appears multiple times inside the Picasso log. Picasso line is called once only for sure.
The text was updated successfully, but these errors were encountered: