changeset 706d02b3cc23 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=706d02b3cc23
description:
Clear the cache only if modules are updated
issue10646
review365731002
diffstat:
trytond/modules/__init__.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (17 lines):
diff -r c9801860af62 -r 706d02b3cc23 trytond/modules/__init__.py
--- a/trytond/modules/__init__.py Thu Aug 19 22:25:24 2021 +0200
+++ b/trytond/modules/__init__.py Thu Aug 19 22:29:09 2021 +0200
@@ -300,9 +300,10 @@
(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')