core: move mcachew into my.core.cachew; use better typing annotations (copied from cachew)

This commit is contained in:
Dima Gerasimov 2023-06-07 22:06:29 +01:00
parent f8cd31044e
commit 6f57def9cd
7 changed files with 113 additions and 77 deletions

View file

@ -61,7 +61,7 @@ def _dal() -> dal.DAL:
return dal.DAL(sources)
@mcachew(depends_on=lambda: inputs())
@mcachew(depends_on=inputs)
def events() -> Results:
from my.core.common import ensure_unique
key = lambda e: object() if isinstance(e, Exception) else e.eid