diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-24 11:09:24 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-24 11:09:24 +0100 |
| commit | e9e522a8e7455900a775678e5d6bc518a289b8d1 (patch) | |
| tree | fd620e67d168adebb830fbc96d4054744cab775f | |
| parent | 82a35e24d4de58e637661591b14d9b4658bcab11 (diff) | |
Invalidated get_models cache in a few more places.
| -rw-r--r-- | django/apps/cache.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/apps/cache.py b/django/apps/cache.py index a67b3cf999..92007f637a 100644 --- a/django/apps/cache.py +++ b/django/apps/cache.py @@ -314,12 +314,14 @@ class AppCache(object): (label, app_config) for label, app_config in self.app_configs.items() if app_config.name in available) + self.get_models.cache_clear() def unset_available_apps(self): """ Cancels a previous call to set_available_apps(). """ self.app_configs = self.stored_app_configs.pop() + self.get_models.cache_clear() def set_installed_apps(self, installed): """ @@ -340,6 +342,7 @@ class AppCache(object): """ self.stored_app_configs.append(self.app_configs) self.app_configs = OrderedDict() + self.get_models.cache_clear() self._apps_loaded = False self.populate_apps(installed) self._models_loaded = False @@ -350,6 +353,7 @@ class AppCache(object): Cancels a previous call to set_installed_apps(). """ self.app_configs = self.stored_app_configs.pop() + self.get_models.cache_clear() ### DEPRECATED METHODS GO BELOW THIS LINE ### |
