core/cachew: special handling for None in order to preserve cache_dir() path

+ add 'suffix' argument for more straighforward logic
This commit is contained in:
Dima Gerasimov 2021-02-21 17:43:00 +00:00 committed by karlicoss
parent da3c1c9b74
commit 9afe1811a5
4 changed files with 59 additions and 3 deletions

View file

@ -52,7 +52,7 @@ def is_bad_table(name: str) -> bool:
from .core.cachew import cache_dir
from .core.common import mcachew
@mcachew(depends_on=lambda: inputs(), cache_path=cache_dir() / 'bluemaestro.cache')
@mcachew(depends_on=lambda: inputs(), cache_path=cache_dir('bluemaestro'))
def measurements() -> Iterable[Measurement]:
# todo ideally this would be via arguments... but needs to be lazy
dbs = inputs()