def _cache_session_data(self, session_data):
    if self._session_cache:
      updated_session_id = self._session_cache.store_session(session_data)
      if updated_session_id:
        session_data['session_id'] = updated_session_id
      return True
    return False
Called by ``DBConnection.create_session`` and by ``DBConnection.retrieve_session`` if there is a change in ``TotoSession.expires``.
dataset/ETHPy150Open JeremyOT/Toto/toto/dbconnection.py/DBConnection._cache_session_data