Reviewers: ,
Please review this at http://codereview.tryton.org/90002/ Affected files: M trytond/backend/database.py Index: trytond/backend/database.py =================================================================== --- a/trytond/backend/database.py +++ b/trytond/backend/database.py @@ -115,6 +115,8 @@ :return: the cache dictionary ''' from trytond.cache import LRUDict + from trytond.transaction import Transaction + user = Transaction().user if context is None: context = {} cache_ctx = context.copy() @@ -122,7 +124,7 @@ '_delete_records'): if i in cache_ctx: del cache_ctx[i] - return self.cache.setdefault(repr(cache_ctx), + return self.cache.setdefault((user, repr(cache_ctx)), LRUDict(MODEL_CACHE_SIZE)) def execute(self, sql, params=None): -- [email protected] mailing list
