lib/util/data-server.js
function clearCache() {
  var overflow = frames.length - MAX_FRAMES_LENGTH;
  overflow > 0 && frames.splice(0, overflow + 60);
  var len = ids.length;
  if (len <= MAX_LENGTH) {
    return;
  }

  var now = Date.now();
  var _ids = [];
  var preserveLen = len;
  overflow = -1;
  if (len >= OVERFLOW_LENGTH) {
    overflow = len - MAX_CACHE_SIZE;
    preserveLen = len - PRESERVE_LEN;
  }
  for (var i = 0; i < len; i++) {
    var id = ids[i];
    var curData = reqData[id];
    if (i > overflow && 
      (i >= preserveLen || 
        (curData.endTime ? now - curData.endTime < CACHE_TIME : now - curData.startTime < CACHE_TIMEOUT))) {
      if (curData.endTime && curData.abort) {
        delete curData.abort;
      }  
      _ids.push(id);
    } else {
      delete reqData[id];
    }
  }
  ids = _ids;
}
function clearCache() {
  var overflow = frames.length - MAX_FRAMES_LENGTH;
  overflow > 0 && frames.splice(0, overflow + 60);
  var len = ids.length;
  if (len <= MAX_LENGTH) {
    return;
  }

  var now = Date.now();
  var _ids = [];
  var preserveLen = len;
  overflow = -1;
  if (len >= OVERFLOW_LENGTH) {
    overflow = len - MAX_CACHE_SIZE;
    preserveLen = len - PRESERVE_LEN;
  }
  for (var i = 0; i < len; i++) {
    var id = ids[i];
    var curData = reqData[id];
    if (i > overflow && 
      (i >= preserveLen || 
        (curData.endTime ? now - curData.endTime < CACHE_TIME : now - curData.startTime < CACHE_TIMEOUT))) {
      if (curData.endTime && curData.abort) {
        delete curData.abort;
      }  
      _ids.push(id);
    } else {
      delete reqData[id];
    }
  }
  ids = _ids;
}
如果超过最大缓存数，清理如下请求数据：
1. 已经请求结束且结束时间超过10秒
2. 请求#1前面的未结束且未被ui读取过的请求