              app_config = self.app_configs.get(app_label)
              if app_config is not None and not app_config.installed:
                  return None
              if (self.available_apps is not None
                      and app_label not in self.available_apps):
                  raise UnavailableApp("App with label %s isn't available." % app_label)
          try:
              return self.app_configs[app_label].models[model_name.lower()]
          except KeyError:
              return None
 
</s> remove         if self.available_apps is not None and app_config.label not in self.available_apps:
 </s> add         if self.available_apps is not None and app_config.name not in self.available_apps: </s> remove             if self.available_apps is not None and app_config.label not in self.available_apps:
 </s> add             if self.available_apps is not None and app_config.name not in self.available_apps: </s> remove                 model_list = [m for m in model_list if m._meta.app_label in self.available_apps]
 </s> add                 model_list = [
                    m for m in model_list
                    if self.app_configs[m._meta.app_label].name in self.available_apps
                ] </s> remove             model_list = [m for m in model_list if m._meta.app_label in self.available_apps]
 </s> add             model_list = [
                m for m in model_list
                if self.app_configs[m._meta.app_label].name in self.available_apps
            ] </s> remove                 "apps, extra apps: " + ", ".join(extra))
        self.available_apps = set(app.rsplit('.', 1)[-1] for app in available)
 </s> add                 "apps, extra apps: %s" % ", ".join(available - installed))
        self.available_apps = available
                    and app_config.name not in self.available_apps):
              app_config = self.app_configs.get(app_label)
              if app_config is not None and not app_config.installed:
                  return None
              if (self.available_apps is not None
                    and app_config.name not in self.available_apps):
                  raise UnavailableApp("App with label %s isn't available." % app_label)
          try:
              return self.app_configs[app_label].models[model_name.lower()]
          except KeyError:
              return None
keep keep keep keep replace keep keep keep keep keep
 Simplified handling of available_apps slightly.

It feels more natural for self.available_apps to contain app names (like
INSTALLED_APPS) than app labels, and this is easy to implement now. 
django/apps/cache.py