Fixes #31697 flaky TestCacheEviction test. Seen here: https://github.com/fleetdm/fleet/actions/runs/16802837212/job/47588005349 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved cache stability by adding safety checks to prevent invalid updates when cache entries are evicted or removed. * Enhanced eviction logic to prevent out-of-bounds errors during cache management. <!-- end of auto-generated comment: release notes by coderabbit.ai -->