Skip to content

Add mod compatibility database caching#853

Open
mibac138 wants to merge 4 commits intorwmt:devfrom
mibac138:mod-compat-cache
Open

Add mod compatibility database caching#853
mibac138 wants to merge 4 commits intorwmt:devfrom
mibac138:mod-compat-cache

Conversation

@mibac138
Copy link
Copy Markdown
Member

@mibac138 mibac138 commented Mar 29, 2026

Introduces caching for the mod compat data. The current HTTP API server doesn't send Last-Modified or ETag headers, however this PR has support for it, if the server were to send those headers at some point.

In case the API is unavailable (and when waiting for the server's response) the cached data is shown (if any is present).

The cache file is ~0.5MB which is small enough not to be an issue. If it ever became too big, we can implement on-disk compression to reduce the size.

The UI could probably be slightly improved to show a different message depending on the state: Loading..., or Updating... (cache present), but not sure if it's worth the effort for such a minor improvement.

Mostly supersedes #831 (except in the rare case when someone turns MP on for the first time, and the API is dead at the same time)

@mibac138 mibac138 added the enhancement New feature or request. label Mar 29, 2026
@rautamiekka
Copy link
Copy Markdown

rautamiekka commented Mar 29, 2026

Leaving the user in the dark is never acceptable. For all the user knows, something is broken, and you'll get complaints aplenty for that.

Likewise, implement the compression right now, not when it's needed and no one will update the mod.

@notfood
Copy link
Copy Markdown
Member

notfood commented Mar 30, 2026

I like this idea better. The user never needs the very latest compatibility database to get things working, it's fine if it's outdated a bit, better than none at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants