@Override
                protected boolean removeEldestEntry(
                        Map.Entry<ByteArray, NativeSslSession> eldest) {
                    // NOTE: does not take into account any session that may have become
                    // invalid.
                    if (maximumSize > 0 && size() > maximumSize) {
                        // Let the subclass know.
                        onBeforeRemoveSession(eldest.getValue());
                        return true;
                    }
                    return false;
                }
Maximum lifetime of a session (in seconds) after which it's considered invalid and should not
be used to for new connections.
common/src/main/java/org/conscrypt/AbstractSessionContext.java