def __init_session_driver(self):
driver = self.settings.get("<STR_LIT>")<EOL>if not driver:<EOL><INDENT>raise SessionConfigurationError('<STR_LIT>')<EOL><DEDENT>driver_settings = self.settings.get("<STR_LIT>", {})<EOL>if not driver_settings:<EOL><INDENT>raise SessionConfigurationError('<STR_LIT>')<EOL><DEDENT>cache_driver = self.settings.get("<STR_LIT>", True)<EOL>if cache_driver:<EOL><INDENT>cache_name = '<STR_LIT>'<EOL>cache_handler = self.handler.application<EOL>if not hasattr(cache_handler, cache_name):<EOL><INDENT>setattr(<EOL>cache_handler,<EOL>cache_name,<EOL>SessionDriverFactory.create_driver(driver, **driver_settings))<EOL><DEDENT>session_driver = getattr(cache_handler, cache_name)<EOL><DEDENT>else:<EOL><INDENT>session_driver = SessionDriverFactory.create_driver(driver, **driver_settings)<EOL><DEDENT>self.driver = session_driver(**driver_settings)<EOL>
setup session driver.