0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-07-13 22:58:46 +02:00
This commit is contained in:
Erik Johnston 2015-08-10 14:16:24 +01:00
parent 6f274f7e13
commit dcefac3b06

View file

@ -26,6 +26,9 @@ DictionaryEntry = namedtuple("DictionaryEntry", ("full", "value"))
class DictionaryCache(object):
"""Caches key -> dictionary lookups, supporting caching partial dicts, i.e.
fetching a subset of dictionary keys for a particular key.
"""
def __init__(self, name, max_entries=1000):
self.cache = LruCache(max_size=max_entries)