def get_max_size_of_cache(connection: 'Connection') ->int:
    """
    Get the upper limit set in FlowDB for the cache size, in bytes.

    Parameters
    ----------
    connection : "Connection"

    Returns
    -------
    int
        Number of bytes in total available to cache tables

    """
    sql = 'SELECT cache_max_size()'
    return int(connection.fetch(sql)[0][0])
