阅读背景:

Redis和MongoDB;我应该如何存储大型JSON对象,性能问题

来源:互联网 

I am currently developing a Node.js app. It has a mySql database server which I use to store all of the data in the app. However, I find myself storing a lot of data that pertains to the User in session storage. How I have been doing this is by using express-session to store the contents of my User class however these User classes can be quite large. I was thinking about writing a middleware that will save the User class as JSON to either redis or mongodb and store the key to the storage within the session cookie. When I retrieve the JSON from redis or mongodb, I will then parse it and use it to reconstruct my User class. I am currently developing a Node.js app. It has




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: