Exemple #1
0
 def do_save(self, dict):
     _apache._global_lock(self._req.server, None, 0)
     dbm = self._get_dbm()
     try:
         dbm[self._sid.encode()] = dumps(dict)
     finally:
         dbm.close()
         _apache._global_unlock(self._req.server, None, 0)
Exemple #2
0
 def do_save(self, dict):
     _apache._global_lock(self._req.server, None, 0)
     dbm = self._get_dbm()
     try:
         dbm[self._sid.encode()] = dumps(dict)
     finally:
         dbm.close()
         _apache._global_unlock(self._req.server, None, 0)
Exemple #3
0
 def do_delete(self):
     _apache._global_lock(self._req.server, None, 0)
     dbm = self._get_dbm()
     try:
         try:
             del dbm[self._sid.encode()]
         except KeyError: pass
     finally:
         dbm.close()
         _apache._global_unlock(self._req.server, None, 0)
Exemple #4
0
 def do_delete(self):
     _apache._global_lock(self._req.server, None, 0)
     dbm = self._get_dbm()
     try:
         try:
             del dbm[self._sid.encode()]
         except KeyError: pass
     finally:
         dbm.close()
         _apache._global_unlock(self._req.server, None, 0)
Exemple #5
0
 def do_load(self):
     _apache._global_lock(self._req.server, None, 0)
     dbm = self._get_dbm()
     try:
         if self._sid.encode() in dbm:
             return loads(dbm[self._sid.encode()])
         else:
             return None
     finally:
         dbm.close()
         _apache._global_unlock(self._req.server, None, 0)
Exemple #6
0
 def do_load(self):
     _apache._global_lock(self._req.server, None, 0)
     dbm = self._get_dbm()
     try:
         if self._sid.encode() in dbm:
             return loads(dbm[self._sid.encode()])
         else:
             return None
     finally:
         dbm.close()
         _apache._global_unlock(self._req.server, None, 0)