Redis suggesstion for selecting data type

Posted by PHP Connect on Stack Overflow See other posts from Stack Overflow or by PHP Connect
Published on 2012-10-12T07:21:44Z Indexed on 2012/10/13 15:38 UTC
Read the original article Hit count: 95

Filed under:

We have questions based where in home page we were showing 2 list

  1. Questions by date modified
  2. Question have bigger views and ans count. And in this both listing if question have same views or ans count then sorting is based on date.

Previously i am directly quiring to MySQL database and fetching the values so it's easy. But each page request hitting to MySQL it's bit expensive then start doing caching.

I started using Redis. Following is the cases when i use redis cache

Issues is On second listing i have to display questions by votes and not answered combine. How can i stored this type of data in redis to load faster with sorting based by 2 conditions votes with time and ans count with time?

© Stack Overflow or respective owner

Related posts about redis