immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
44.84k stars 2.17k forks source link

Update external assets are aggressively cached in web #6955

Open etnoy opened 7 months ago

etnoy commented 7 months ago

The bug

When updating an external asset and refreshing the library, there is very aggressive caching on the web that prevents it from being shown to the user. This caching works fine for upload libraries but not external libraries.

We need to be smarter about caching external assets.

This is a known issue and is documented in the external library docs but we should still fix it

The OS that Immich Server is running on

N/A

Version of Immich Server

v1.94.1

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

-

Your .env content

-

Reproduction steps

1. Scan external library
2. Change metadata of an asset
3. Rescan
4. Nothing changes in web view

Additional information

No response

pyorot commented 2 months ago

there is a lot of failed cache invalidation in immich, and idk how it should be fixed

another example that comes to mind is when a person thumbnail is changed, it changes the thumbnail on that person's page yet going back to the /people page shows the old thumbnail

but yes, i've also had this problem where i transcoded an incompatible video, and after jobs completed, immich asset viewer didn't see the new version of the video for a while so wouldn't play it