def exc_type_cache_key(record):
    """Gets a cache key for the given exception type in a LogRecord.

    Args:
        record: logging.LogRecord instance
    Returns:
        str with a cache key or None if no exc_info is given in a LogRecord
    """
    exc_info = record.exc_info
    if exc_info:
        return exc_info[0].__name__
    return None