mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-19 17:34:18 -05:00
Remove failed deferreds from cache
This commit is contained in:
parent
433314cc34
commit
b811c98574
@ -205,8 +205,14 @@ class CacheDescriptor(object):
|
|||||||
self.function_to_call,
|
self.function_to_call,
|
||||||
obj, *args, **kwargs
|
obj, *args, **kwargs
|
||||||
)
|
)
|
||||||
ret = ObservableDeferred(ret, consumeErrors=False)
|
|
||||||
|
|
||||||
|
def onErr(f):
|
||||||
|
cache.invalidate(*keyargs)
|
||||||
|
return f
|
||||||
|
|
||||||
|
ret.addErrback(onErr)
|
||||||
|
|
||||||
|
ret = ObservableDeferred(ret, consumeErrors=False)
|
||||||
cache.update(sequence, *(keyargs + [ret]))
|
cache.update(sequence, *(keyargs + [ret]))
|
||||||
|
|
||||||
return ret.observe()
|
return ret.observe()
|
||||||
|
Loading…
Reference in New Issue
Block a user