Message 75381

Author
nicoe
Date
2022-04-10.18:11:55
Message id
75381

Content

I realized that a problem with the cache invalidation could occur if a module manipulates the domain / states or whatever property of field given the fact that the depends properties computed from those are cached and not invalidated.

In python 3.8, it's not difficult to invalidate those: simply calling del field.readonly_depends will invalidate the cache. But for python3.7 we're using the werkzeug implementation and it only supports using del on werkzeug >= 2.0. For earlier version the idea I have is to use the set it with the _missing value but it's quite ugly and depends on an implementation detail of werkzeug's cached_property.

(A very simple fix would be to turn those in simple properties and live with the performance penalty until we drop python3.7).

History
Date User Action Args
2022-04-10 18:11:55nicoesetmessageid: <1649607115.4676962.TCZF6ELNA6IUGXK7.issue11399@tryton.org>
2022-04-10 18:11:55nicoelinkissue11399 messages
2022-04-10 18:11:55nicoecreate

Showing 10 items. Show all history (warning: this could be VERY long)