Skip to content
Snippets Groups Projects

Add ability to configure refresh period and max size of loading caches

2 files
+ 22
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -11,6 +11,7 @@
*/
package org.eclipsefoundation.core.config;
import java.time.Duration;
import java.util.Map;
import java.util.Optional;
@@ -63,5 +64,17 @@ public interface LoadingCacheConfig {
*/
@WithDefault("5")
Long timeout();
/**
* @return the duration a given cache element should exist before recalculation
*/
@WithDefault("PT1H")
Duration refreshAfter();
/**
* @return the number of keys that should be maintained in the cache
*/
@WithDefault("10")
int maximumSize();
}
}
Loading