Remove duplicate pop in InMemoryCacheProvider.remove (#5795)

The second self._cache.pop(key, None) call is a guaranteed no-op: the first pop has already removed the key (or returned None), and there is no await between the two statements that could allow another coroutine to re-add it. Removing the dead line clarifies intent without changing behavior.
This commit is contained in:
Taisir Hassan
2026-05-19 07:02:20 -07:00
committed by GitHub
Unverified
parent 66a09a76af
commit 3f522a8246
@@ -161,7 +161,6 @@ class InMemoryCacheProvider:
entry = self._cache.pop(key, None)
if entry is not None:
self._current_size_bytes -= entry[2]
self._cache.pop(key, None)
def create_protection_scopes_cache_key(request: ProtectionScopesRequest) -> str: