kopia lustrzana https://github.com/snarfed/bridgy-fed
cache Protocol.for_handle
rodzic
e21dabe98d
commit
497136f1fc
|
@ -350,6 +350,7 @@ class Protocol:
|
|||
logger.info(f'No matching protocol found for {id} !')
|
||||
return None
|
||||
|
||||
@cached(LRUCache(20000), lock=Lock())
|
||||
@staticmethod
|
||||
def for_handle(handle):
|
||||
"""Returns the protocol for a given handle.
|
||||
|
|
|
@ -264,6 +264,7 @@ class TestCase(unittest.TestCase, testutil.Asserts):
|
|||
did.resolve_web.cache.clear()
|
||||
ids.web_ap_base_domain.cache.clear()
|
||||
protocol.Protocol.for_id.cache.clear()
|
||||
protocol.Protocol.for_handle.cache.clear()
|
||||
User.count_followers.cache.clear()
|
||||
|
||||
for cls in ExplicitEnableFake, Fake, OtherFake:
|
||||
|
|
Ładowanie…
Reference in New Issue