singleflight: add OnceGroup struct
Open
- Dominant language
- Go
- Stars
- 13.3k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
OnceGroup.Do would have the same semantics as Group.Do, but caches and returns the first computed result.
Example: looking up the user id in /etc/passwd for a given username; something you might need to do once and not more than that, since (if) you don't expect the value to change during the life of the process.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.