@Override
    void onBeforeAddSession(NativeSslSession session) {
        // TODO: Do this in background thread.
        if (persistentCache != null) {
            byte[] data = session.toBytes();
            if (data != null) {
                persistentCache.putSessionData(session.toSSLSession(), data);
            }
        }
    }
Applications should not use this method. Instead use {@link
Conscrypt#setServerSessionCache(SSLContext, SSLServerSessionCache)}.
common/src/main/java/org/conscrypt/ServerSessionContext.java