'Returns a list of cached instances.'

def all(self):

    class_list = list(self.get_class_list())
    if (not class_list):
        self.cache = []
        return []
    if (self.cache is not None):
        return self.cache
    results = []
    for cls_path in class_list:
        (module_name, class_name) = cls_path.rsplit('.', 1)
        try:
            module = __import__(module_name, {}, {}, class_name)
            cls = getattr(module, class_name)
            if self.instances:
                results.append(cls())
            else:
                results.append(cls)
        except Exception:
            logger = logging.getLogger('sentry.errors')
            logger.exception('Unable    to    import    %s', cls_path)
            continue
    self.cache = results
    return results
