You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seem to be no way to pre-warm the contents of groupcache at startup. My use-case is described in https://groups.google.com/forum/#!topic/golang-nuts/MweGX6QWNyY but, briefly, is to make sure that after startup my application can process at full speed (this requires groupcache to be fully warmed up) instead of taking 20+ minutes for the empty cache to warm up, during which processing is very slow.
The text was updated successfully, but these errors were encountered:
CAFxX
changed the title
Add (or document) how to pre-warm the cache
Add a mechanism (or document how) to pre-warm the cache
Jun 6, 2018
@fiorix that would work in a world (or for the rare scenarios) with no per-operation latencies. My use-case is described in the URL above: if you read that post and think about it, loading all individual keys is what we already do. And it's taking 20+ minutes. With a bulk load operation, we could do the same thing in <30s.
A "bulk fetch" Group (cached, Get calls issued at start-up); store items in a data-structure so that individual items can be accessed.
A "single item fetch" Group (cached, Get not issued at start-up).
An outer Getter wrapping the two others (with no cache) that:
Get the bulk from the first Group, and extracts the relevant sub-item if present.
Fallback to retrieve the item from the single-item Group.
If relevant, the outer Getter could also provide key versioning or expiry emulation by appending content to a section of the key that the underlying Getters ignores, but that's off topic.
There seem to be no way to pre-warm the contents of groupcache at startup. My use-case is described in https://groups.google.com/forum/#!topic/golang-nuts/MweGX6QWNyY but, briefly, is to make sure that after startup my application can process at full speed (this requires groupcache to be fully warmed up) instead of taking 20+ minutes for the empty cache to warm up, during which processing is very slow.
The text was updated successfully, but these errors were encountered: