news-android icon indicating copy to clipboard operation
news-android copied to clipboard

sidebar nav avatar is not updating

Open Blaimi opened this issue 2 years ago • 7 comments

I changed my avatar and now the news app still displays the old picture. The nextcloud app itself got the update.

Blaimi avatar Aug 31 '23 20:08 Blaimi

@Blaimi Is this still an issue? The images are cached for about a day if I'm not mistaken.

David-Development avatar Sep 05 '23 09:09 David-Development

Hi :),

yes. It's still the wrong avatar. I can't remember when i canged it, but it should be around two weeks ago. I did not clear any caches or relogin or something.

Thank you :)

Blaimi avatar Sep 05 '23 13:09 Blaimi

@Blaimi Which version of the app are you using?

David-Development avatar Sep 05 '23 14:09 David-Development

0.9.9.81. I can't remember if it is installed via Play Store or via F-Droid

Blaimi avatar Sep 05 '23 14:09 Blaimi

But: If the image cache is implemented with a ttl: I had the old image for at least two years, maybe longer than I have this device 😉

Blaimi avatar Sep 05 '23 17:09 Blaimi

It shouldn't be.. 😅

could you check what the Avatar is when you open the following url: https://nextcloud.xxx.com/index.php/avatar/<your-name>/64 - e.g. https://nextcloud.xxx.com/index.php/avatar/david/64

You can find the user id in the web UI if you go to files -> Files Settings -> WebDav -> The last part of the URL is your user id.

Maybe you can also get the response headers to see what the TTL is for you? e.g. curl -v https://nextcloud.xxx.com/index.php/avatar/david/64 (please make sure to remove all sensitive information before dumping the output here)

David-Development avatar Sep 10 '23 10:09 David-Development

Okay, I found the issue. It looks like that the library we use for ImageLoading doesn't handle caching very well. It only uses a URL as the cache key. Cache Headers such as Last-Modified or ETag are completely ignored. I'll try to find a solution to fix this issue..

https://github.com/bumptech/glide/issues/1847

David-Development avatar Sep 30 '23 10:09 David-Development