dataloadgen icon indicating copy to clipboard operation
dataloadgen copied to clipboard

Skip cache on error (or more general policy).

Open coady opened this issue 6 months ago • 0 comments

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.

coady avatar Jun 14 '25 18:06 coady