5 ms·
You could even use Redis for this. You really need a cache or key-value store, not a database.
by twblalock 10y ago
You could even use Redis for this. You really need a cache or key-value store, not a database.
- Kiro 10y agoThanks! In my real application I want to be able to update a sub-array of the document, like this: collection['some_identifier']['items'][3] = 123. Just setting the value for the key (e.g. overwriting the whole document) seems wasteful since I only want to update a portion of it. With MongoDB it's easy to set sub-data so I guess I'm looking for something where it's as easy but without the downsides.
- amdavidson 10y agoIn redis couldn't your key be something like "someIdentifier_items_3" and your value be 123? Then if you wanted to make it 456 you would only be updating "someIdentifier_items_3".