def __init__(self, app=None, config_prefix=None):
self.app = app<EOL>if app is not None:<EOL><INDENT>self.init_app(app, config_prefix)<EOL><DEDENT>
Initialize Redis extension for Flask application.

        If ``app`` argument provided then initialize redis connection using
        application config values.

        If no ``app`` argument provided you should do initialization later with
        :meth:`init_app` method.

        Generally extension expects configuration to be prefixed with ``REDIS``
        config prefix, to customize things pass different ``config_prefix``
        here or on calling :meth:`init_app` method. For example, if you have
        URL to Redis in ``CACHE_URL`` config key, you should pass
        ``config_prefix='CACHE'`` to extension.

        :param app: :class:`flask.Flask` application instance.
        :param config_prefix: Config prefix to use. By default: ``REDIS``