How can I store post rankings that change with time?
<p>I'm trying to learn how to code a website algorithm like Reddit.com where there are thousands of posts that need to be ranked. Their ranking algorithm works like this (you don't have to read it, its more of a general question that I have): <a href="http://amix.dk/blog/post/19588" rel="nofollow">http://amix.dk/blog/post/19588</a></p>

<p>Right now I have posts stored in a database, I record their dates and they each have an upvotes and downvotes field so I'm storing their records. I want to figure out how do you store their rankings? When specific posts have ranking values, but they change with time, how could you store their rankings?</p>

<p>If they aren't stored, do you rank every post every time a user loads the page?</p>

<p>When would you store the posts? Do you run a cron job to automatically give every post a new value every x minutes? Do you store their value? Which is temporary. Maybe, until that post reaches its minimum score and is forgotten?</p>
