Use memory cache for RNG

The cache store the etree element so it can only be cached in memory.
This commit is contained in:
Cédric Krier committed 2023-09-22 15:50:50 +02:00
1 parent ee99fbd13c
commit abefd595dd
1 file changed
+2 -2
+2 -2
View File
@@ -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