I need to store some user and document state information in a json-like object. For example:
{
"name": "Henry",
"company": "Disney",
"is_recommended": true,
"plan_type" "free",
etc.
}
This information is fetched from the database and stored in memory in the session when the user logs in or changes any user information.
I have some experience with redis and I find myself comfortable with using that, but I was wondering if the above could be done in redis without jumping through too many hoops. For example, here are some queries I would need to run:
update items set plan_type="Paid" where company = "Disney";
Do you think doing the above would be possible in redis, or should I try using something else (my thought was mongodb) to accomplish the above?
99% of the usage would be reading data, however 1% would be updating data in bulk fashion, and it'd need to be done instantaneously.
A similar question was asked six years ago -- What's the most efficient document-oriented database engine to store thousands of medium sized documents? -- but I'm sure much has changed in both redis and mongodb since then...