Try to load category ranges from userlevel cache file.

    :param path: path to userlevel cache file
    :type path: str
    :returns: category ranges dict or None
    :rtype: None or dict of RangeGroup

def load_from_cache(path=user_path):
    '''
    Try to load category ranges from userlevel cache file.

    :param path: path to userlevel cache file
    :type path: str
    :returns: category ranges dict or None
    :rtype: None or dict of RangeGroup
    '''
    if not path:
        return
    try:
        with open(path, 'rb') as f:
            dversion, mversion, data = pickle.load(f)
        if dversion == data_version and mversion == module_version:
            return data
    except (FileNotFoundError, ValueError, EOFError):
        pass