Skip to content

Comments

Add inventory cache with forceRefreshInventory support#41

Merged
LinaBell merged 8 commits intomainfrom
dev
Feb 18, 2026
Merged

Add inventory cache with forceRefreshInventory support#41
LinaBell merged 8 commits intomainfrom
dev

Conversation

@LinaBell
Copy link
Contributor

Summary

  • Add 6h TTL in-memory cache for ecosystem inventory items to reduce API calls
  • Wire up forceRefreshInventory from client URL params through to the server cache
  • Both getInventoryItems and awardBadge now use the shared cache instead of direct Ecosystem.create calls

Test plan

  • Load game state — badges should render correctly from cached inventory
  • Append ?forceRefreshInventory=true to the app URL — server should bypass cache and fetch fresh
  • Award a badge — should use cached inventory to find the badge item
  • Verify cache resets after 6 hours or server restart

Generated with Claude Code

Terraform and others added 8 commits February 13, 2026 00:28
Cache ecosystem inventory items in memory to reduce API calls. Both
getInventoryItems and awardBadge now use the shared cache. The client
reads forceRefreshInventory from URL search params and passes it through
to the server, which bypasses the cache when set to true.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@LinaBell LinaBell merged commit 0c0e02a into main Feb 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant