def all(self):
class_list = list(self.get_class_list())<EOL>if not class_list:<EOL><INDENT>self.cache = []<EOL>return []<EOL><DEDENT>if self.cache is not None:<EOL><INDENT>return self.cache<EOL><DEDENT>results = []<EOL>for cls_path in class_list:<EOL><INDENT>module_name, class_name = cls_path.rsplit('<STR_LIT:.>', <NUM_LIT:1>)<EOL>try:<EOL><INDENT>module = __import__(module_name, {}, {}, class_name)<EOL>cls = getattr(module, class_name)<EOL>if self.instances:<EOL><INDENT>results.append(cls())<EOL><DEDENT>else:<EOL><INDENT>results.append(cls)<EOL><DEDENT><DEDENT>except Exception:<EOL><INDENT>logger.exception('<STR_LIT>'.format(cls=cls_path))<EOL>continue<EOL><DEDENT><DEDENT>self.cache = results<EOL>return results<EOL>
Returns a list of cached instances.