original_string: public function handler_write($id, $data) {
          if (is_null($this->connection)) {
              // The session has already been closed, don't attempt another write.
              error_log('Tried to write session: '.$id.' before open or after close.');
              return false;
          }
  
          // We do not do locking here because memcached doesn't.  Also
          // PHP does open, read, destroy, write, close. When a session doesn't exist.
          // There can be race conditions on new sessions racing each other but we can
          // address that in the future.
          try {
              $this->connection->setex($id, $this->timeout, $data);
          } catch (RedisException $e) {
              error_log('Failed talking to redis: '.$e->getMessage());
              return false;
          }
          return true;
      }
code: public function handler_write($id, $data) {
          if (is_null($this->connection)) {
              // The session has already been closed, don't attempt another write.
              error_log('Tried to write session: '.$id.' before open or after close.');
              return false;
          }
  
          // We do not do locking here because memcached doesn't.  Also
          // PHP does open, read, destroy, write, close. When a session doesn't exist.
          // There can be race conditions on new sessions racing each other but we can
          // address that in the future.
          try {
              $this->connection->setex($id, $this->timeout, $data);
          } catch (RedisException $e) {
              error_log('Failed talking to redis: '.$e->getMessage());
              return false;
          }
          return true;
      }
code_tokens: public function handler_write ( $ id , $ data ) { if ( is_null ( $ this -> connection ) ) { // The session has already been closed, don't attempt another write. error_log ( 'Tried to write session: ' . $ id . ' before open or after close.' ) ; return false ; } // We do not do locking here because memcached doesn't.  Also // PHP does open, read, destroy, write, close. When a session doesn't exist. // There can be race conditions on new sessions racing each other but we can // address that in the future. try { $ this -> connection -> setex ( $ id , $ this -> timeout , $ data ) ; } catch ( RedisException $ e ) { error_log ( 'Failed talking to redis: ' . $ e -> getMessage ( ) ) ; return false ; } return true ; }
docstring: Write the serialized session data to our session store.
  
  @param string $id session id to write.
  @param string $data session data
  @return bool true on write success, false on failure
docstring_tokens: Write the serialized session data to our session store .