openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #00334
Translation getters and cache
Dear experts,
I'm wondering about the way translations are cached in ir_translations:
can someone please shed some light here?
In bin/addons/base/ir/ir_translation.py, the functions _get_ids and
_get_source are cached. I suppose they are used to fetch translations by
id or by source, is that right ?
Now, the methods create/write/unlink invalidate the cache when
translations are changed, but:
- the cache for _get_source is cleared for the language in the
translation record
- the cache for _get_ids is cleared for the language in the context
Why are they not treated the same?
Yours,
Lionel/Numérigraphe
Follow ups