From ddc4e6b8d27ed85bfa4c4cf92bf8142c646007f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 19 Aug 2021 22:29:09 +0200 Subject: [PATCH] Clear the cache only if modules are updated issue10646 review365731002 (grafted from 706d02b3cc23efdb037a8ebaaaf53b11cf062cfc) --HG-- branch : 6.0 --- trytond/modules/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/trytond/modules/__init__.py b/trytond/modules/__init__.py index e7e2353624..eb4e65120f 100644 --- a/trytond/modules/__init__.py +++ b/trytond/modules/__init__.py @@ -300,9 +300,10 @@ def load_module_graph(graph, pool, update=None, lang=None): (module, to_delete) = modules_todo.pop() convert.post_import(pool, module, to_delete) - # Ensure cache is clear for other instances - Cache.clear_all() - Cache.refresh_pool(transaction) + if update: + # Ensure cache is clear for other instances + Cache.clear_all() + Cache.refresh_pool(transaction) logger.info('all modules loaded')