An efficient way to store view counts for objects?

Posted by Nick Brooks on Stack Overflow See other posts from Stack Overflow or by Nick Brooks
Published on 2010-12-27T19:23:43Z Indexed on 2010/12/30 2:53 UTC
Read the original article Hit count: 161

Filed under:
|
|
|
|

I maintain an application where users are able to store images, and then share them. The system is powered by MongoDB at the back end. Most of the image depiction pages are cached as flat HTML files, but I can run some code just before loading the file.

I've decided to implement a view count for the system. I am wondering what is the best storage place for that. It should be like Memcached but it should save the viewcounts every hour or so, so even if our server has to be restarted we won't lose the view counts.

What is the best solution for that (preferably with a PHP extension as a client)?

© Stack Overflow or respective owner

Related posts about php

Related posts about php5