When trytond is distributed across multiple processes, each instance has its own version of the cache. The synchronization of those caches is not instantaneous when one process clear its own. Generally it is not a problem because data stored in cache are almost static and there are not consequence in having for a short period processes with different value. But this is not true for the translation. When a user changes a translation from a record, the client write the new value and reload the record. But as translations are stored in the cache, if the two operations (write and read) are not performed on the same process, the result may be awkward. Because the read request may return the value before the write and give the feeling to the user that its changes were not saved. To solve this issue, I propose to use the translation cache only if its last cleaning is greater than the biggest modification date (write_date) of the records. This will solve the described issue because the modification of the translation is done by writing on the record which updates the write_date. So the cache of other process will be skipped if they were not synchronized since the write. This will not provide a big overhead because the record is already read from the table (we just need to read also the write_date). And the cache will still be used for record modified a long time ago.
|2020-01-23 19:07:04||ced||set||messageid: <firstname.lastname@example.org>|
|2020-01-23 19:07:04||ced||link||issue9013 messages|
Showing 10 items. Show all history (warning: this could be VERY long)