nosql - Confused about Redis structuring of data -
nosql - Confused about Redis structuring of data -
i have next json info construction needs cached in redis:
{ siteid:1, zoneid:1, adwidth:100, adheight:100, totalvisibleads:1, ads:[{ id:1, link:"...", imagelink:"...", alttext:"google", views:100 }, { id:1, link:"...", imagelink:"...", alttext:"google", views:100 }] } i need able homecoming construction in "redis" way querying siteid. incr views field pick random advertisement ads array expire entire object @ date if store hash site:1:zone:1 how can site:1? or thinking totally wrong?
you should consider using mongodb in case need store nested info , query nested indexes. if performance issue mongodb queries fast.
refer http://docs.mongodb.org/manual/tutorial/model-tree-structures-with-nested-sets/
redis nosql
Comments
Post a Comment