Rewrite SuggestionsCache & limit parallelism (#851)

## Description
A rewrite of the `SuggestionsCache` to simplify it as a read-through
cache. The downside of this is that updated suggestions won't be
reflected in the UI unless the user reloads the page, but I think that's
an okay trade off.

Also adds parallelism limits to fetching suggestions to reduce the
number of simultaneous API calls. And moved the combining logic to use
the `Default` dispatcher to free up an IO one.

Also adds an initial delay to both the suggestions & tv provider
workers, so a cold start of the app isn't starved.

### Related issues
Related to #849

### Testing
Emulator & unit testing

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Ray 2026-02-09 17:39:40 -05:00 committed by GitHub
parent 28ed1a491b
commit b06761eaa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 99 additions and 223 deletions

View file

@ -285,6 +285,8 @@ dependencies {
ksp(libs.auto.service.ksp)
implementation(platform(libs.okhttp.bom))
implementation(libs.okhttp)
implementation(libs.kache)
implementation(libs.kache.file)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)