mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 23:42:33 +01:00
docs
This commit is contained in:
parent
d552861346
commit
cd80019eec
1 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,11 @@ def enumerate_leaves(node, depth):
|
||||||
|
|
||||||
|
|
||||||
class LruCache(object):
|
class LruCache(object):
|
||||||
"""Least-recently-used cache."""
|
"""
|
||||||
|
Least-recently-used cache.
|
||||||
|
Supports del_multi only if cache_type=TreeCache
|
||||||
|
If cache_type=TreeCache, all keys must be tuples.
|
||||||
|
"""
|
||||||
def __init__(self, max_size, keylen=1, cache_type=dict):
|
def __init__(self, max_size, keylen=1, cache_type=dict):
|
||||||
cache = cache_type()
|
cache = cache_type()
|
||||||
self.size = 0
|
self.size = 0
|
||||||
|
|
Loading…
Reference in a new issue