@Override
    public final void setSessionCacheSize(int size) throws IllegalArgumentException {
        if (size < 0) {
            throw new IllegalArgumentException("size < 0");
        }

        int oldMaximum = maximumSize;
        maximumSize = size;

        // Trim cache to size if necessary.
        if (size < oldMaximum) {
            trimToSize();
        }
    }
This is provided for API-compatibility only, not intended for use. No guarantees are
made WRT performance or the validity of the returned session.
common/src/main/java/org/conscrypt/AbstractSessionContext.java