perf(backend): cache YouTube searches and shrink the thumbnail URLs

Repeated searches and song lookups now reuse a single-flight memory cache, so
concurrent or debounced queries hit YouTube once instead of on every keystroke.
Thumbnails are resolved at a configurable size instead of the largest variant,
which cuts the image payload the browser pulls from Google.
This commit is contained in:
2026-07-20 17:29:28 +02:00
parent 7c62f8a8e8
commit dd3150e3d4
5 changed files with 144 additions and 9 deletions
+4 -1
View File
@@ -51,7 +51,10 @@
"YouTube": {
"GeographicalLocation": "US",
"StreamUrlCacheSeconds": 1800,
"SearchContinuationCacheSeconds": 600
"SearchContinuationCacheSeconds": 600,
"SearchResultsCacheSeconds": 900,
"SongInfoCacheSeconds": 86400,
"ThumbnailSize": 240
},
"PlayList": {
"Routes": {