Skip to content
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

Thumbnails client cache is not invalidated when regenerating #10309

Open
1 of 3 tasks
sebbi08 opened this issue Jun 14, 2024 · 0 comments
Open
1 of 3 tasks

Thumbnails client cache is not invalidated when regenerating #10309

sebbi08 opened this issue Jun 14, 2024 · 0 comments

Comments

@sebbi08
Copy link
Contributor

sebbi08 commented Jun 14, 2024

The bug

I tried the new feature with the "no back thumbnail for videos" but somehow it all the time just showed me the old black thumbnail in the browser. Now I noticed that the app shows the new thumbnail and when reloading the browser with cache invalidation also the browser shows the new image. Maybe there is an option to add the thumbnail generation date to the URL of the thumbnail so on new generation it will be invalidated.

The OS that Immich Server is running on

Version of Immich Server

1.106.4

Version of Immich Mobile App

latest

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
    
    labels:
      wud.tag.include: "^v\\d+\\.\\d+\\.\\d+$"
      traefik.enable: true
      traefik.http.routers.immich.rule: Host(`...`)
      traefik.http.routers.immich.entrypoints: websecure
      traefik.http.routers.immich.tls.certresolver: letsencrypt
      traefik.http.services.immich.loadbalancer.server.port: 3001
    networks:
      - all
      
  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - ./model-cache:/cache
    env_file:
      - .env
    restart: always
    
    labels:
      wud.tag.include: "^v\\d+\\.\\d+\\.\\d+$"
    networks:
      - all

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:afb290a0a0d0b2bd7537b62ebff1eb84d045c757c1c31ca2ca48c79536c0de82
    restart: always
    
    labels:
      wud.watch: false
    networks:
      - all

      
  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    restart: always
    
    labels:
      wud.watch: false
    networks:
      - all


networks:
  all:
    external: true

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=v1.106.4

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=...

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. setup immich version pre 1.106.1
2. upload this video https://photos.app.goo.gl/4DzWNqhP4fCQH2Yn9
3. update to immich version >= 1.106.1
4. regenerate thumbnail the app will show the correct new one the browser will show the old black one until you invalidate the side cache or reload the page with web debugger open.

Relevant log output

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant