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.
Currently, when using a dataloader with a cache, errors returned by the
BatchFunc
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 typeSkipCacheError
along with theNewSkipCacheError
constructor function to allow users to wrap errors they don't want to be cached.