title: rate limiting algorithm suggestions for the given scenario
body: <p>What is the best mechanism to implement the below rate limiting use-cases. General algorithms like Token Bucket can be used but I want the implementation to be in the context of memcached. Appreciate the help on this.</p>
  
  <ul>
  <li>allow only 100 calls from customer ABC in a day.</li>
  <li>allow only 50  api calls for customer ABC in an hour.</li>
  <li>allow only 5 api calls for customer ABC for any userid in an hour.</li>
  </ul>