core: add base cachew directory
This commit is contained in:
parent
10a8ebaae4
commit
c54d85037c
4 changed files with 24 additions and 2 deletions
|
@ -15,6 +15,7 @@ import pytz
|
|||
from more_itertools import bucket
|
||||
|
||||
from ..common import get_files, LazyLogger, cproperty, mcachew
|
||||
from ..core.cachew import cache_dir
|
||||
|
||||
from my.config import emfit as config
|
||||
|
||||
|
@ -292,7 +293,7 @@ def dir_hash(path: Path):
|
|||
|
||||
|
||||
# TODO take __file__ into account somehow?
|
||||
@mcachew(cache_path=config.cache_path, hashf=dir_hash, logger=logger)
|
||||
@mcachew(cache_path=cache_dir() / 'emfit.cache', hashf=dir_hash, logger=logger)
|
||||
def iter_datas(path: Path=config.export_path) -> Iterator[Emfit]:
|
||||
for f in get_files(path, glob='*.json'):
|
||||
sid = f.stem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue