- Would it maybe make more sense to use `refreshA...
# github-workflows-kt
v
• Would it maybe make more sense to use
refreshAfterWrite
instead of
expireAfterWrite
for the cache? • (maybe combined with a size based eviction using
maximumSize
that evicts LRU if max size is reached,
softValues
is not usable as Aedile uses an
AsyncCache
under the hood.) • Would it maybe make sense to also cache the
maven-metadata.xml
generation now that using version ranges is a thing and not only Renovate and friends use it?
p
refreshAfterWrite
- I was looking for something like this, great idea! success baby so in practice it means that we'll avoid cache miss if the expiration time is hit, and the older entry will be served until the newer one is computed in the background, right? if yes, I'm all for using it. Too bad the readme of https://github.com/sksamuel/aedile doesn't mention it, but in https://github.com/ben-manes/caffeine 's readme it's indeed there •
maximumSize
- the goal is to save us from running out of memory, right? in practice, I don't think we've ever hit this issue, but feel free to set a value like 1000 perhaps? I've never done any measurements of how much memory a single average binding takes, so it's hard to say for sure • caching
maven-metadata.xml
- yes, makes sense to me as well
v
so in practice it means that we'll avoid cache miss if the expiration time is hit, and the older entry will be served until the newer one is computed in the background, right?
That's how I got it, yes.
the goal is to save us from running out of memory, right?
Most probably, yes. I guess we can also start without. But it might make sense to add a metric about cache size, amount of bindings should probably sufficient, what do you think @LeoColman? Then - especially when using
refresh...
instead of
expire...
we can see how the cache grows and how it relates to the memory to find a good balanced combination of max size and max heap if necessary.
👍 1
l
We already have cache hits/misses, I think we can add a metric about cache size, yes. Probably will have to code it
👌 2
Added cache size. It was easy, already added by the cache framework metrics
👍 2