Files
romm/frontend/src/services/cache
Spinnich dbd213c6c9 perf(home): stop counting the whole library for the two home rows
The "Recently added" and "Recently played" rows each ask for 15 games and
render 15 covers, but both requests still made the server count every game
in the library and then discarded the number. On a large library that count
is the expensive part of the request, so opening the home page paid for two
whole-library counts nobody sees.

Both rows now send with_total=false, the option added for the gallery in
#4062.

The flag has to reach the request and the cache-clear pattern together: the
pattern is matched against the cache key by substring, so adding it to only
one side would leave the row permanently stale. The cached service now
builds both from a single parameter map per row so they cannot drift, and
the tests assert the clear pattern still matches the key the request writes.

Fixes #4099

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 17:20:23 +00:00
..