feat(render #53): EntityClassificationCache.InvalidateEntity + tests

Idempotent removal of a cached entry by entity id. Tests #4 and #5 from
spec section 7.1 lock in the contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-05-10 17:42:09 +02:00
parent 694815c499
commit aea4460eae
2 changed files with 32 additions and 0 deletions

View file

@ -62,4 +62,13 @@ internal sealed class EntityClassificationCache
Batches = batches,
};
}
/// <summary>
/// Remove the cache entry for <paramref name="entityId"/>. No-op if the
/// id isn't cached.
/// </summary>
public void InvalidateEntity(uint entityId)
{
_entries.Remove(entityId);
}
}