rewrite: Snapshots and Lion.

This commit is contained in:
2022-11-20 08:34:18 +02:00
parent 7bd546126b
commit 2eea40f679
9 changed files with 322 additions and 29 deletions

View File

@@ -69,7 +69,11 @@ class RowTable(Table, Generic[RowT]):
).where(*args, **kwargs)
class WeakCache(MutableMapping):
WK = TypeVar('WK')
WV = TypeVar('WV')
class WeakCache(Generic[WK, WV], MutableMapping[WK, WV]):
def __init__(self, ref_cache):
self.ref_cache = ref_cache
self.weak_cache = WeakValueDictionary()