checkHasCache method

bool checkHasCache(
  1. AdType adType
)

Implementation

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