Store client side JS params as Model fields or key-value pairs?
I need to store about 20 params for the client side JS. Each user has his own params in the DB. it is possible that some new params might be added in the future while some may be removed. I'm a little confused as to how I should store these values
- Should I store it as a fields wherein each param is Model field?
- Should i store it as key value pairs?
What would be an ide开发者_JAVA百科a way to do this?
If you want to do things that require DB, like searching, editing through admin, aggregating, use DB. Otherwise key value pairs would be enough.
Plus caching.
精彩评论