mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 22:55:41 +00:00
Auto-invalidate game cache when flush marker is updated (#5273)
During warmup, the staging server may cache stale game data that was loaded before the active server flushed. Instead of exposing an RPC for cache invalidation (which leaks internal state), the server now automatically detects when the flush marker is updated and invalidates any cached games. Changes: - GamesManager: Added `invalidateCacheIfFlushMarkerUpdated()` that checks the flush marker's modification time and clears the cache if it's been updated since the last check - Called before checking if a game is in cache, so stale data is cleared before any attempt to use it - Removed the InvalidateGameCache RPC (no longer needed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -304,9 +304,10 @@ main() {
|
||||
|
||||
# Step 6: Create flush marker - signals that disk state is fresh
|
||||
# Any waiting lazy-loads on staging will now proceed with fresh data.
|
||||
# The Eagle server automatically detects the flush marker update and invalidates any stale cached games.
|
||||
log_info "[DEPLOY:${deploy_id}] Step 6: Creating flush marker..."
|
||||
create_flush_marker "${deploy_id}" "eagle-${staging}"
|
||||
log_info "[DEPLOY:${deploy_id}] Flush marker created - waiting lazy-loads can now proceed"
|
||||
log_info "[DEPLOY:${deploy_id}] Flush marker created - server will auto-invalidate stale cache"
|
||||
|
||||
# Update .env for admin service
|
||||
local env_file="${APP_DIR}/.env"
|
||||
|
||||
Reference in New Issue
Block a user