spierce7
12/13/2023, 6:03 PMList<Item>
.
Lets say I make Request A, and it returns `Item`s with the ids: [1, 2, 3]
.
Then sometime later I make Request B, and it returns `Item`s with the ids [3, 4, 5]
, and lets say that the ID 3
has values that were updated by the server, from some other operation unknown to my mobile app.
If my mobile app gets the cached Request A again, it gets the updated item with ID 3
, right? Obviously Store has no idea that 1 and 2 could be out of date though.Matthew Ramotar
12/13/2023, 6:30 PMKey
, then the second value [3, 4, 5]
will overwrite the first value [1, 2, 3]
.
Insertion strategies will be added in Store6: https://github.com/MobileNativeFoundation/Store/pull/550
And Store6 snapshots will be available soon: https://github.com/MobileNativeFoundation/Store/pull/591spierce7
12/13/2023, 6:32 PMspierce7
12/13/2023, 6:32 PM3
cached / stored?Matthew Ramotar
12/13/2023, 6:35 PMMultiCache
and Store5, the list will be overwritten, but the items would be cached individually, so you’d have items 1 and 2 based on the first response and items 3-5 based on the second response.Matthew Ramotar
12/13/2023, 6:36 PMspierce7
12/13/2023, 6:45 PMspierce7
12/13/2023, 6:46 PMspierce7
12/13/2023, 6:46 PM