checkHasCache method

bool checkHasCache(
  1. AdType adType
)

Implementation

bool checkHasCache(AdType adType){
  var bean = _resultMap[adType];
  if(null!=bean){
    var expired = DateTime.now().millisecondsSinceEpoch-bean.loadTime>(bean.maxAdInfoBean.expire*1000);
    if(expired){
      removeAdByType(bean.maxAdInfoBean.id);
      return false;
    }else{
      return true;
    }
  }
  return false;
}