From 715289a25a2974db82e438748f2efa3aa7010402 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 24 Feb 2019 10:44:15 +0100 Subject: [PATCH] resetcache in config/api not in storage --- tiramisu/api.py | 1 + tiramisu/config.py | 1 + tiramisu/storage/dictionary/setting.py | 1 - tiramisu/storage/sqlite3/setting.py | 1 - 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tiramisu/api.py b/tiramisu/api.py index 60894ca..b428fd4 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -977,6 +977,7 @@ class TiramisuContextProperty(TiramisuContext): else: force_store_value = False self._config_bag.context.cfgimpl_get_settings()._p_.importation(properties) + self._config_bag.context.cfgimpl_reset_cache(None, None) del self._config_bag.properties if force_store_value: self._force_store_value() diff --git a/tiramisu/config.py b/tiramisu/config.py index 9b2b6b0..b0cbb3d 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -685,6 +685,7 @@ class _CommonConfig(SubConfig): duplicated_config.cfgimpl_get_settings()._p_.importation(properties) duplicated_config.cfgimpl_get_settings()._pp_.importation(self.cfgimpl_get_settings( )._pp_.exportation()) + duplicated_config.cfgimpl_reset_cache(None, None) if child is not None: duplicated_config._impl_children.append(child) child._impl_meta = weakref.ref(duplicated_config) diff --git a/tiramisu/storage/dictionary/setting.py b/tiramisu/storage/dictionary/setting.py index 8dc5ef3..27df542 100644 --- a/tiramisu/storage/dictionary/setting.py +++ b/tiramisu/storage/dictionary/setting.py @@ -58,7 +58,6 @@ class Properties(Cache): def importation(self, properties): self._properties = properties - self.reset_all_cache() class Permissives(Cache): diff --git a/tiramisu/storage/sqlite3/setting.py b/tiramisu/storage/sqlite3/setting.py index f7adaba..24bc5f9 100644 --- a/tiramisu/storage/sqlite3/setting.py +++ b/tiramisu/storage/sqlite3/setting.py @@ -76,7 +76,6 @@ class Properties(Sqlite3DB): self._session_id, ), False) self._storage._conn.commit() - self.reset_all_cache() class Permissives(Sqlite3DB):