Skip to content

Skip cache on error (or more general policy). #23

Description

@coady

Follow-up to #20, subscriptions (i.e. long-lived requests) typically want a more flexible caching policy. Not caching errors which may be transient is a common use case.

func WithCacheErrors(b bool) Option

But maybe it would better to just generalize it.

func WithCachePolicy(func(KeyT, ValueT, error) bool) Option

graph-gophers dataloader also has caching options.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions