kschlesselmann
07/05/2019, 8:10 AMcache
is
private val cache: Cache<String, Signal<out AttributeDefinition>> = Caffeine.newBuilder()
.maximumSize(500)
.expireAfterWrite(Duration.ofMinutes(5))
.build()
and the call to CacheMono
looks like
fun findByName(name: String): Mono<AttributeDefinition> = CacheMono
.lookup(cache.asMap(), name)
.onCacheMissResume(findByNameRemote(name))
kralli
07/05/2019, 8:13 AMkschlesselmann
07/05/2019, 8:14 AMkralli
07/05/2019, 8:17 AM