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:
@@ -14,5 +14,14 @@ namespace Musify.Infrastructure.Configuration
|
||||
|
||||
[Range(60, 3600)]
|
||||
public int SearchContinuationCacheSeconds { get; set; } = 600;
|
||||
|
||||
[Range(0, 86400)]
|
||||
public int SearchResultsCacheSeconds { get; set; } = 900;
|
||||
|
||||
[Range(0, 604800)]
|
||||
public int SongInfoCacheSeconds { get; set; } = 86400;
|
||||
|
||||
[Range(32, 720)]
|
||||
public int ThumbnailSize { get; set; } = 240;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user