Skip to content

Commit babdba7

Browse files
Merge pull request #185 from valeriupredoi/turn_off_storage_caching
Replace `default_cache_type` with `first`
2 parents fe79079 + b476252 commit babdba7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activestorage/netcdf_to_zarr.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def gen_json(file_url, varname, outf, storage_type, storage_options):
1818
secret=S3_SECRET_KEY,
1919
client_kwargs={'endpoint_url': S3_URL},
2020
default_fill_cache=False,
21-
default_cache_type="none"
21+
default_cache_type="first" # best for HDF5
2222
)
2323
fs2 = fsspec.filesystem('')
2424
with fs.open(file_url, 'rb') as s3file:
@@ -32,7 +32,7 @@ def gen_json(file_url, varname, outf, storage_type, storage_options):
3232
elif storage_type == "s3" and storage_options is not None:
3333
storage_options = storage_options.copy()
3434
storage_options['default_fill_cache'] = False
35-
storage_options['default_cache_type'] = "none"
35+
storage_options['default_cache_type'] = "first" # best for HDF5
3636
fs = s3fs.S3FileSystem(**storage_options)
3737
fs2 = fsspec.filesystem('')
3838
with fs.open(file_url, 'rb') as s3file:

0 commit comments

Comments
 (0)