Implementing a periodically refreshing Cache in Java

EHCache is a pretty full-featured java caching library. i would imagine they have something which would work for you.

In order to do an incremental reload of a cache (which would work on most any cache), just iterate through the currently loaded entries and force refresh them. (you could run this task on a background scheduler).

As an alternative to forcing the entire cache to reload, EHCache has the ability to specify a "time-to-live" for an entry, so entries will automatically be reloaded if they are too stale.