From 961a3330e1289175d103654400446cb87a732065 Mon Sep 17 00:00:00 2001 From: shay Date: Fri, 17 Apr 2026 16:56:45 -0400 Subject: [PATCH] fix(generator): invalidate composite cache on not_found + drop unused import Cache entry for widget:composite:{username} was not invalidated when a user's fetcher payload transitioned to not_found, serving stale SVGs. --- generator/src/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/src/worker.py b/generator/src/worker.py index a73ae66..0376075 100644 --- a/generator/src/worker.py +++ b/generator/src/worker.py @@ -4,7 +4,6 @@ Run as its own container: CMD python -m src.worker """ import logging import time -from typing import Optional from . import cache, config, db, fetcher_client, placeholder, processor from .widgets import compose_widget @@ -46,6 +45,7 @@ def process_one() -> bool: if payload.get("error") == "not_found": svg = placeholder.render("not_found", username, theme="dark") db.put_widgets(username, "not_found", {"composite": svg}) + cache.Cache().delete(f"widget:composite:{username}") db.complete_job(job["id"]) log.info("not_found marker persisted for %s", username) return True