dataloader
dataloader copied to clipboard
Support cache skipping for `Load()` calls that throw `SkipCacheError`
Currently, when using a dataloader with a cache, errors returned by theBatchFunc are stored in the cache.
A user should be able to decide on caching errors depending on the error type (e.g. temporary errors when using caches with long ttl).
To support this use case, this PR adds a new error type SkipCacheError along with the NewSkipCacheError constructor function to allow users to wrap errors they don't want to be cached.