Skip to content

[TS-3287] Cached ecosystem fetch#2126

Merged
ebkr merged 16 commits into
developfrom
ecosystem-fetch
May 18, 2026
Merged

[TS-3287] Cached ecosystem fetch#2126
ebkr merged 16 commits into
developfrom
ecosystem-fetch

Conversation

@ethangreen-dev
Copy link
Copy Markdown
Collaborator

@ethangreen-dev ethangreen-dev commented Apr 14, 2026

Fetches the latest schema from the API on game selection with a 12 hour refresh window (can be tuned or removed if not necessary). Schema is cached locally and update requests make proper use of the 304 response to avoid pulling the schema when it hasnt been updated.

This was initially a PR from the Thunderstore fork. Deleted that, make a new PR in this repo.

Depends on #2113

@ebkr ebkr changed the base branch from develop to ecosystem-merge April 14, 2026 12:49
@ethangreen-dev ethangreen-dev marked this pull request as ready for review April 14, 2026 23:04
@ethangreen-dev ethangreen-dev requested a review from ebkr April 14, 2026 23:04
Comment thread src/r2mm/ecosystem/EcosystemSchema.ts Outdated
Comment thread src/r2mm/ecosystem/EcosystemSchema.ts Outdated
Comment thread src/r2mm/ecosystem/EcosystemSchema.ts Outdated
Comment thread test/vitest/tests/unit/EcosystemSchema/EcosystemSchema.spec.ts Outdated
@ebkr ebkr force-pushed the ecosystem-merge branch from 385e74c to d8825c9 Compare April 15, 2026 09:52
@ethangreen-dev ethangreen-dev requested a review from ebkr April 20, 2026 04:54
@ebkr ebkr requested a review from Copilot April 20, 2026 05:30

This comment was marked as outdated.

@ethangreen-dev ethangreen-dev changed the title Cached ecosystem fetch [TS-3287] Cached ecosystem fetch Apr 20, 2026
@ethangreen-dev ethangreen-dev changed the base branch from ecosystem-merge to develop May 2, 2026 05:42
Fetches the latest schema from the API on game selection. Uses the 304
response of the API to determine if the remote version has been updated
since the last request. Not a huge difference in performance locally but
more efficient on the server side.
This is basically a four-step approach. The provider:
1. Checks to see if the images are bundled.
2. Checks to see if an instance of the schema is being served on
   localhost:1337
3. Checks to see if any images have been cached locally.
4. Retrieves the image from the CDN.

Notably this also features the fire-once-and-fail-quick CDN check where
it checks the connection once during startup and, if it fails, attempts
steps 1-3 and then uses a default image.
[TS-3696] Use CDN image assets
[TS-3708] Pull game images from cdn / localhost in sync script
[TS-3714] Add new game image placeholder asset
@ebkr ebkr merged commit e080332 into develop May 18, 2026
5 checks passed
@ebkr ebkr deleted the ecosystem-fetch branch May 18, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants