Cache repeated query translation and expansion
build-push / docker (push) Successful in 5m20s

This commit is contained in:
AI Assistant
2026-03-16 16:15:16 +09:00
parent 60fdd7842c
commit 93b9f571ab
3 changed files with 117 additions and 3 deletions
+2 -1
View File
@@ -257,11 +257,12 @@
## Recent Change Log
- Date: `2026-03-16`
- What changed:
- Added in-process query translation / expansion cache inside `GeminiService` so repeated identical searches can reuse the same English query and variant list without re-calling Gemini or Google Translate.
- Added in-process response caching for repeated SearXNG requests and for source fetches used during Envato / Artgrid enrichment.
- Added in-process Gemini visual cache for fetched thumbnails and extracted preview frames so repeated candidate evaluation no longer re-downloads the same asset or reruns `ffmpeg` every time.
- Tightened backend tests to cover the new cache helpers.
- Why it changed:
- Even after reducing query fan-out, repeated search passes and Gemini reevaluation were still paying duplicate network and media-processing cost inside the same running backend.
- Even after reducing query fan-out, repeated search passes and Gemini reevaluation were still paying duplicate translation, network, and media-processing cost inside the same running backend.
- How it was verified:
- `go test ./...`
- `bash scripts/selftest.sh`