From abefd595dd5868f1f657bc3c40d145017f81c3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 22 Sep 2023 15:50:50 +0200 Subject: [PATCH] Use memory cache for RNG The cache store the etree element so it can only be cached in memory. --- trytond/trytond/ir/ui/view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/trytond/ir/ui/view.py b/trytond/trytond/ir/ui/view.py index ca8772c388..267858373b 100644 --- a/trytond/trytond/ir/ui/view.py +++ b/trytond/trytond/ir/ui/view.py @@ -5,7 +5,7 @@ import os from lxml import etree -from trytond.cache import Cache +from trytond.cache import Cache, MemoryCache from trytond.i18n import gettext from trytond.model import Index, ModelSQL, ModelView, fields from trytond.model.exceptions import ValidationError @@ -65,7 +65,7 @@ class View(ModelSQL, ModelView): domain = fields.Char('Domain', states={ 'invisible': ~Eval('inherit'), }, depends=['inherit']) - _get_rng_cache = Cache('ir_ui_view.get_rng', context=False) + _get_rng_cache = MemoryCache('ir_ui_view.get_rng', context=False) _view_get_cache = Cache('ir_ui_view.view_get') __module_index = None