groupcache
groupcache copied to clipboard
Support whether the returned value was cached or not
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 @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?
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.