LoadDataset needs cache directory option
klacansky opened this issue · 3 comments
I think it would be useful to have an optional keyword argument cache_dir
to specify directory where to cache files (if they are accessed remotely).
'LoadDataset' is cache_dir
agnostic and I think it must remain this way.
There are users/services loading the same datasets with different access policies i.e .'LoadDataset' is ununware of how binary data is retrieved.
I think this issue is more related/connected to Access/DiskAccess/CloudAccess and must be changed accordingly.
I am thinking what a user in Python may do. I would probably want to specify the cache directory per dataset, not per access or read. I would not have default cache directory because if somebody does regular backups, they may not want to backup cache directory in their home directory. There could also be issues with global cache if two datasets have the same name and different content (how is it resolved currently?).
import OpenVisus as ov
dataset = ov.LoadDataset('test.idx', cache_dir='.')
data = dataset.read(x=[100,101])
data = dataset.read(y=[101,102])
...