def check_cache_time(path, max_age):
 if (not os.path.isfile(path)):
  return False
 cache_modified_time = os.stat(path).st_mtime
 time_now = time.time()
 if (cache_modified_time < (time_now - max_age)):
  return False
 else:
  return True

def check_cache_time ( path , max_age ) : if ( not os . path . isfile ( path ) ) : return False cache_modified_time = os . stat ( path ) . st_mtime time_now = time . time ( ) if ( cache_modified_time < ( time_now - max_age ) ) : return False else : return True
checks if a file has been created/modified in the [last max_age] seconds .