Re: [netcdf-java] Behaviour of NetCDF file cache in Java NetCDF libraries

Jon Blower wrote:
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?

every n minutes it removes files using LRU.

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?

ill probably move to ehcache (version 4.2?), which i think allows this.
ill have to look at the code for a workaround...



(Rich and Clare - I think this might be causing the caching problems
you are seeing with ncWMS.)

Thanks,
Jon




  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: