I've implemented cache warming in EhCache using this example. Does EhCache's BootstrapCacheLoader run reload the cache every time it is called, or does it also check the cached data is stale before running?
Asked
Active
Viewed 1,123 times
1 Answers
1
The whole point of the BootstrapCacheLoader
is to run once at application startup to bring known or identified hot keys in memory.
What happens if you run it multiple times depends on its implementation.
Now if what you want is eager refresh of entries, you may instead want to look at documentation for RefreshAheadCache
or ScheduledRefreshCacheExtension
.

Louis Jacomet
- 13,661
- 2
- 34
- 43
-
What I'm hoping to achieve is to avoid cache warming until the cache has expired. Multiple separate Java main classes run during the evening and the cache shouldn't be warmed by each of them. – ben3000 Sep 25 '15 at 09:41
-
I've been setting cache TTL to a day of seconds – ben3000 Sep 25 '15 at 09:43