Performance issue - Cache not being used in some cases

Description

Hi, while refactoring MSequence to solve the ticket - I noticed a very bad performance issue because for certain tables the Cache was not being used - in my tests this was mostly AD_RecentItem, but after I added the attached patch

it seems the problem is wider.

It's probably caused by some context not correctly set for multi-threading.

The issue is: the MTable.get methods find the required object in the cache, but is discarded because the context is different, so it goes again to read the record to the database, and if the code requires to get a column (like it was in MSequence) then all the columns are read again from database.

Environment

None

Assignee

Unassigned

Reporter

Carlos Ruiz

Tested By

None

Priority

Major
Configure