title: Memcache backup or a better way to store user session/activity and dump into DB once?
body: <p>I need to store user sessions when they login to my website. Plan it this:
  Store user session in memcache when user signs in.
  All user activities are tracked so log all that in memcache only so i dont have to hit the DB every second writing "A shared a photo" "A clicked on a link.."
  When user logs off OR the connect is cut then write an edt time and copy all data to the DB.</p>
  
  <p>Now problem is if memcache crashes then all this data gets lost. So what is the work around?
  Do note: I am tracking all user activity including mouse clicks, so i cannot be writing to the DB every second for each user hence i was suggested to use memcache but i am open too other ideas also.</p>