mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
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:
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:
|
||||
|
||||
Reference in New Issue
Block a user