How can I get a new image not cached in android coil? #1142
Unanswered
BurningDroid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am developing an android app using the Jetpack Compose with Coil ImageLoader library.
It shows a user's profile image.
I receive the profile data from the API.
GET: /users/{userId}
The response contains
userId
andprofileImgKey
.For the user profile image, Backend provides
GET: /photo/{userId}
API.But the problem is that if some user update his/her profile image, other users still see the previous profile image not the new image.
Because it is cached by Coil.
If I turn-off the caching option, it may work fine.
But I don't want to do it.
I don't want to lose the performance benefit.
When the user update their profile image, the
profileImgKey
is changed.So I want to use this as a cache key.
But I don't know how to use this.
Beta Was this translation helpful? Give feedback.
All reactions