logoalt Hacker News

NovaX10/11/20242 repliesview on HN

One optimization for background refresh is coalescing the individual reloads into a batch operation based on a time/space window. Here is how we do it in the Java world. [1]

[1] https://github.com/ben-manes/caffeine/tree/master/examples/c...


Replies

mh-10/11/2024

Thank you for your OSS work! I used Caffeine many years ago.

show 1 reply
bnkamalesh10/12/2024

aha yes! It's in my todo list to introduce bulk updates. On the other hand, I'll be publishing a batcher package soon which does something very close to what you suggested here. Thank you