code: func (s *allInstancesSnapshot) MeetsCriteria(criteria cacheCriteria) bool {
  	if criteria.MaxAge > 0 {
  		// Sub() is technically broken by time changes until we have monotonic time
  		now := time.Now()
  		if now.Sub(s.timestamp) > criteria.MaxAge {
  			klog.V(6).Infof("instanceCache snapshot cannot be used as is older than MaxAge=%s", criteria.MaxAge)
  			return false
  		}
  	}
  
  	if len(criteria.HasInstances) != 0 {
  		for _, id := range criteria.HasInstances {
  			if nil == s.instances[id] {
  				klog.V(6).Infof("instanceCache snapshot cannot be used as does not contain instance %s", id)
  				return false
  			}
  		}
  	}
  
  	return true
  }
docs: // MeetsCriteria returns true if the snapshot meets the criteria in cacheCriteria