mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Rename to on_invalidate
This commit is contained in:
parent
dc76a3e909
commit
c0d7d9d642
3 changed files with 15 additions and 21 deletions
|
@ -214,7 +214,7 @@ class CacheDecoratorTestCase(unittest.TestCase):
|
|||
@cached(cache_context=True)
|
||||
def func2(self, key, cache_context):
|
||||
callcount2[0] += 1
|
||||
return self.func(key, cache_context=cache_context)
|
||||
return self.func(key, on_invalidate=cache_context.invalidate)
|
||||
|
||||
a = A()
|
||||
yield a.func2("foo")
|
||||
|
@ -247,7 +247,7 @@ class CacheDecoratorTestCase(unittest.TestCase):
|
|||
@cached(cache_context=True)
|
||||
def func2(self, key, cache_context):
|
||||
callcount2[0] += 1
|
||||
return self.func(key, cache_context=cache_context)
|
||||
return self.func(key, on_invalidate=cache_context.invalidate)
|
||||
|
||||
a = A()
|
||||
yield a.func2("foo")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue