コード例 #1
0
ファイル: cache_redis.py プロジェクト: coopengo/trytond
 def _key(self, key):
     if self.context:
         t = Transaction()
         key = (key, t.user, freeze(t.context))
     return '%x' % hash(key)
コード例 #2
0
ファイル: cache.py プロジェクト: coopengo/trytond
 def _key(self, key):
     if self.context:
         return (key, Transaction().user, freeze(Transaction().context))
     return key