Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Jon Blower wrote:
static public void initNetcdfFileCache(int minElementsInMemory, int maxElementsInMemory, int hardLimit, int period) {Dear all (esp. John), I think I have been misunderstanding the intended behaviour of the cache of NetCDF files (the one that's initialized with NetcdfDataset.initNetcdfFileCache()). What is the behaviour of the "periodic cleanup"? Does it remove elements from memory only when the number of elements in memory exceeds a certain number? Or does it also remove elements based on their age? The behaviour I would like is the latter - i.e. I would like to be able to guarantee that the elements in the cache are no older than, say, five minutes. But this isn't the behaviour I'm seeing: elements seem to persist essentially for ever. So perhaps the former behaviour is the correct one? In which case, how would you recommend I implement the latter behaviour?
i think if you set minElementsInMemory = 0then it will remove all unlocked elements every period seconds. this isnt exactly what you want, but its closer
netcdf-java
archives: