I'm working to build a module in Pligg CMS which would limit a user to the amount of votes they can give in 24 hours. If they pass the limit (let's say 40/day) a JavaScript popup comes up to say "slow down!" ... similar to how Digg has updated their system.
What is the best way to keep track of the daily votes? Should I query the MySQL database every time a vote is cast to check if they're passing the limit? Or is it smarter to store the data in some type of physical file on the server? I don't really know how to build cache data so I'm thinking of creating a function to manually check the amount of votes each time. Would like to hear better suggestions of course!