code: function isOverMaxCalled(req) {
  
    var api = req.method + " " + req.path
      , key = ip(req) + " " + api
      , current = new Date().getTime()
      , prev = cache.get(key);
  
    if (prev) {
  
      // 超过一天清除计数
      if (current - prev.last > 24 * 60 * 60 * 1000) {
        prev.policy1.counter = prev.policy2.counter = 1;
        prev.policy1.last = prev.policy2.last = current;
      }
      prev.last = current;
      prev.total++;
  
      if (checkDayPolicy(api, prev, current)) {
        return true;
      }
  
      if (checkSecondPolicy(api, prev, current)) {
        return true;
      }
  
      cache.set(key, prev);
    } else {
  
      cache.set(key, {
        resource: req.method + req.path,
        remote: ip(req),
        total: 1,
        last: current,
        policy1: {
          last: current,
          counter: 1
        },
        policy2: {
          last: current,
          counter: 1
        }
      });
    }
  
    return false;
  }
docs: 限制调用速率
  @param req
  @returns {boolean}