Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
142 stars 69 forks source link

Improve cache cleanup #1268

Closed tdrwenski closed 9 months ago

tdrwenski commented 9 months ago

Description of Changes

The RandomAccessFileCache puts a read lock on files which sometimes causes issues for people who are trying to delete a file that's cached.

When a cleanup is performed, check if any of the cached files were deleted and if so remove them. The cleanups are scheduled to happen at regular intervals for the NetcdfFile and RandomAccessFile caches (by default every 10 min in TDS).

PR Checklist