mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 04:04:54 -04:00
Use cache.pop() instead of a separate membership test + del []
This commit is contained in:
parent
27080698e7
commit
f53fcbce97
2 changed files with 8 additions and 2 deletions
|
@ -75,8 +75,7 @@ def cached(max_entries=1000):
|
|||
defer.returnValue(ret)
|
||||
|
||||
def invalidate(key):
|
||||
if key in cache:
|
||||
del cache[key]
|
||||
cache.pop(key, None)
|
||||
|
||||
wrapped.invalidate = invalidate
|
||||
wrapped.prefill = prefill
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue