logoalt Hacker News

bnkamalesh10/11/20241 replyview on HN

@zimpenfish yes you are right. refetch is initiated on the first Get between 9-10mins, and the timer is reset as soon as the back fetch is successful


Replies

NovaX10/11/2024

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...

show 2 replies