Skip to content
Discussion options

You must be logged in to vote

Yeah, bulk refresh is very confusing (#7). What you probably want is to look at the coalescing bulkloader example. Caffeine doesn't directly offer any bulk refresh logic so it will otherwise perform 10 load() calls.

A getAll that has the opportunity to bulk refresh is likely much rarer than parallel get calls for distinct keys, but wouldn't naturally fall into a case where the cache could call loadAll instead. The coalescing approach over a time/space window handles both getAll and get cases uniformly, and if using a library like Reactor then its trivial glue code. This is nice because refreshes are optimistic, async loads so a small buffering delay won't impact user-facing latencies and …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ben-manes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants