SecondaryCacheLoader.fetchObjectsFromDatabaseAsync should return sparse map
- Dominant language
- TypeScript
- Stars
- 162
- Forks
- 11
- Avg merge
- 18h 3m
- Merged PRs (30d)
- 19
Description
Context: https://github.com/expo/universe/pull/7641/files/90dc1071ada997f57c0b8d33b7b0e7d7e5fe2b15#r641291143
> Looking at this PR, I wonder if `EntitySecondaryCacheLoader` should allow this method to return "sparse" maps that are missing some of the provided keys. A missing key would mean the object was missing from the database and be treated the same way as `null` or `undefined`. This way, implementers of `fetchObjectsFromDatabaseAsync` wouldn't need to pad maps with `null` entries like this.
> `EntitySecondaryCacheLoader` would then fill in `null` for all of the missing keys so that the caller of the loader still gets a map with every single key in it, potentially with `null` values.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.