Skip to content

Support whether the returned value was cached or not #61

Description

@gabriel

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions