Skip to content

SecondaryCacheLoader.fetchObjectsFromDatabaseAsync should return sparse map #128

@wschurman

Description

@wschurman

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions