engine: cache proxy descriptor result on engine's cubes (#38067)
This commit is contained in:
parent
3f7bedf0d3
commit
4701568437
|
@ -232,7 +232,10 @@ class ProxyListDescriptor(object):
|
|||
self.chain = chain
|
||||
|
||||
def __get__(self, obj, t=None):
|
||||
return ProxyList(obj.engine, obj, self.attribute, self.cls, chain=self.chain)
|
||||
key = '_proxy_list_cache_%s' % id(self)
|
||||
if key not in obj.__dict__:
|
||||
obj.__dict__[key] = ProxyList(obj.engine, obj, self.attribute, self.cls, chain=self.chain)
|
||||
return obj.__dict__[key]
|
||||
|
||||
|
||||
class EngineCube(object):
|
||||
|
|
Loading…
Reference in New Issue