|
|
|
|
|
by bww
620 days ago
|
|
You may be interested in Groupcache's method for filling caches, it solves the same problem that I believe this project is aimed at. Groupcache has a similar goal of limiting the number of fetches required to fill a cache key to one—regardless of the number of concurrent requests for that key—but it doesn't try to speculatively fetch data, it just coordinates fetching so that all the routines attempting to query the same key make one fetch between them and share the same result. https://github.com/golang/groupcache?tab=readme-ov-file#load... |
|
https://github.com/golang/groupcache/tree/master/singlefligh...
https://pkg.go.dev/golang.org/x/sync/singleflight