textileio / photos

[DEPRECATED] Encrypted, secure, decentralized personal data wallet -- technology behind textile.photos
https://www.textile.photos/
MIT License
241 stars 22 forks source link

back to caching avatars #1321

Closed andrewxhill closed 5 years ago

andrewxhill commented 5 years ago

a couple months back we had an avatar caching issue. my best guess of what was happening was that the cafes sent a 200s response that was actually an error (e.g. an html response). it led to some avatars turning grey and never recovering. they didn’t recover because that bunk response was cached in RN via a flag in the avatar image cache='force-cache'.

to fix that issue we simply changed it back to, cache='reload' which flushed the bad results and everything worked again. Except that now the avatars do this little flash most times you load the screen.

solution

To fix this, I'm going to put the flag back to force-cache. However, to avoid any issues like we hit last time, I'm going to just wrap an un-cached image with a cached one... The one in the background will be force-cache and the one over it will be reload. Ideally, we can remove the un-cached one in a later PR.