Clear the cache only if modules are updated

issue10646
review365731002
(grafted from 706d02b3cc23efdb037a8ebaaaf53b11cf062cfc)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2021-08-19 22:29:09 +02:00
parent 405da33172
commit ddc4e6b8d2
+4 -3
View File
@@ -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')