Closed maxmynter closed 6 months ago
Before you continue: Let's try with a bare dict
with lock in nnbench.types.memo
as a cache first, since all methods you implemented are class-scoped.
Likewise, getting a memo from cache should prompt a key lookup first:
# this in a decorator applied to Memo.__call__():
_sid = id(self)
if _sid in _memo_cache:
return _memo_cache[_sid]
return self.__call__()
Closes #126 Needs #127
Integrate Cache into setup and teardown based on state(This is to be done by the user in the setUp and tearDown hooks).