stream-ssl: Only cache SSL sessions after they shut down.