Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support whether the returned value was cached or not #61

Open
gabriel opened this issue Jan 20, 2016 · 2 comments
Open

Support whether the returned value was cached or not #61

gabriel opened this issue Jan 20, 2016 · 2 comments

Comments

@gabriel
Copy link

gabriel commented Jan 20, 2016

There is no way to know if a returned value was the result of the call or a cached result? This is useful to know in certain circumstances.

Something like:

// SomeMethod ... and also returns whether the value was cached result or not
func (g *Group) SomeMethod(key string, fn func() (interface{}, error)) (interface{}, bool, error) {

In the case of cached lookup the returned bool is true.

gabriel added a commit to keybase/client that referenced this issue Jan 20, 2016
We don't want to re-apply the previous singleflighted update.
Temporarily copying singleflight here until we add in behavior to the
golang package: golang/groupcache#61
@dineshappavoo
Copy link

dineshappavoo commented Apr 15, 2016

@gabriel @bradfitz Hi, Is there anyone working on this enhancement. I am really interested contributing to this project. I thought I could contribute to this requirement. Can we chat about this? Is there any chat group for this project?

@bradfitz
Copy link
Contributor

There is no chat group for this project, and it's largely frozen. People use this and it works, but nobody is particularly interested in adding features (which has a cost in terms of maintenance and updating code)

If it's not very invasive, we could consider it, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants