You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typically returning null from a load implies that the value with that key is known not to exist, which is different from not being found, the first is a successful load (of an empty result) while the latter is an errored load. Cache behavior is key to this difference. For instance, if something is known not to exist, repeatedly fetching it would be unhelpful.
Having your batch function throw/return an Error when values have failed to load will ensure the cache is skipped.
If you have the following events:
DataLoader. load(1) // returns null
Some code then inserts 1
DataLoader.load(1) // returns null, even though the record exists.
What to do here? Is there an elegant way to clear the cache for keys that returned null?
The text was updated successfully, but these errors were encountered: