@classmethod<EOL><INDENT>def get_or_create_index(cls, app, wh):<DEDENT>
if wh in app.extensions['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>return app.extensions['<STR_LIT>']['<STR_LIT>'][wh]<EOL><DEDENT>index = cls.create_index(app, wh)<EOL>app.extensions['<STR_LIT>']['<STR_LIT>'][wh] = index<EOL>return index<EOL>
Gets a previously cached index or creates a new one for the
        given app and whoosheer.

        :param app: The application instance.
        :param wh: The whoosheer instance for which the index should be
                   retrieved or created.