Projet

Général

Profil

0008-engine-cache-proxy-descriptor-result-on-engine-s-cub.patch

Benjamin Dauvergne, 03 décembre 2019 15:11

Télécharger (930 octets)

Voir les différences:

Subject: [PATCH 08/13] engine: cache proxy descriptor result on engine's cubes
 (#38067)

 bijoe/engine.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
bijoe/engine.py
232 232
        self.chain = chain
233 233

  
234 234
    def __get__(self, obj, t=None):
235
        return ProxyList(obj.engine, obj, self.attribute, self.cls, chain=self.chain)
235
        key = '_proxy_list_cache_%s' % id(self)
236
        if key not in obj.__dict__:
237
            obj.__dict__[key] = ProxyList(obj.engine, obj, self.attribute, self.cls, chain=self.chain)
238
        return obj.__dict__[key]
236 239

  
237 240

  
238 241
class EngineCube(object):
239
-