server/session.py
changeset 9082 a2c6d908edeb
parent 9081 7c9a6dc4ee5d
child 9083 fe254c803ed1
equal deleted inserted replaced
9081:7c9a6dc4ee5d 9082:a2c6d908edeb
   507         #: ordered list of operations to be processed on commit/rollback
   507         #: ordered list of operations to be processed on commit/rollback
   508         self.pending_operations = []
   508         self.pending_operations = []
   509         #: (None, 'precommit', 'postcommit', 'uncommitable')
   509         #: (None, 'precommit', 'postcommit', 'uncommitable')
   510         self.commit_state = None
   510         self.commit_state = None
   511         self.pruned_hooks_cache = {}
   511         self.pruned_hooks_cache = {}
       
   512         self.local_perm_cache.clear()
   512 
   513 
   513     # Connection Set Management ###############################################
   514     # Connection Set Management ###############################################
   514     @property
   515     @property
   515     def cnxset(self):
   516     def cnxset(self):
   516         return self._cnxset
   517         return self._cnxset
  1222     free_cnxset = cnx_meth('free_cnxset')
  1223     free_cnxset = cnx_meth('free_cnxset')
  1223 
  1224 
  1224     def _touch(self):
  1225     def _touch(self):
  1225         """update latest session usage timestamp and reset mode to read"""
  1226         """update latest session usage timestamp and reset mode to read"""
  1226         self._timestamp.touch()
  1227         self._timestamp.touch()
  1227         self.local_perm_cache.clear() # XXX simply move in cnx.transaction_data, no?
  1228 
       
  1229     local_perm_cache = cnx_attr('local_perm_cache')
       
  1230     @local_perm_cache.setter
       
  1231     def local_perm_cache(self, value):
       
  1232         #base class assign an empty dict:-(
       
  1233         assert value == {}
       
  1234         pass
  1228 
  1235 
  1229     # shared data handling ###################################################
  1236     # shared data handling ###################################################
  1230 
  1237 
  1231     def get_shared_data(self, key, default=None, pop=False, txdata=False):
  1238     def get_shared_data(self, key, default=None, pop=False, txdata=False):
  1232         """return value associated to `key` in session data"""
  1239         """return value associated to `key` in session data"""