DiskCache
DiskCache(base_dir=None, model=None, *, max_entries_per_model=20)One-file, full-key-verified atomic NetCDF result cache.
Entries live at <root>/<model>/<parameters>-<full-sha256>.nc. Contents have an independently checked full key and schema; legacy files are never reused. The directory is a trusted local cache, not an untrusted file reader.
Methods
| Name | Description |
|---|---|
| clear | Delete only format-owned entries, preserving other files. |
| delete | Remove matching owned entries, never arbitrary files or symlinks. |
| entries | List this format’s entries without materializing posterior data. |
| prune | Keep the N newest entries per model; return count removed. |
clear
DiskCache.clear()Delete only format-owned entries, preserving other files.
delete
DiskCache.delete(key)Remove matching owned entries, never arbitrary files or symlinks.
entries
DiskCache.entries()List this format’s entries without materializing posterior data.
prune
DiskCache.prune(keep=None)Keep the N newest entries per model; return count removed.