public function prepend($key, $value) {
    do {
      $result = $this->get($key, null, $cas_token);
      if (!$result || !is_string($result)) {
        $this->result_code = self::RES_NOTSTORED;
        return false;
      }

      $result = $value . $result;
      $result = $this->cas($cas_token, $key, $result);
    } while (!$result && $this->result_code == self::RES_DATA_EXISTS);

    $this->result_code = $result ? self::RES_SUCCESS : self::RES_NOTSTORED;
    return $result;
  }
public function prepend($key, $value) {
    do {
      $result = $this->get($key, null, $cas_token);
      if (!$result || !is_string($result)) {
        $this->result_code = self::RES_NOTSTORED;
        return false;
      }

      $result = $value . $result;
      $result = $this->cas($cas_token, $key, $result);
    } while (!$result && $this->result_code == self::RES_DATA_EXISTS);

    $this->result_code = $result ? self::RES_SUCCESS : self::RES_NOTSTORED;
    return $result;
  }
public function prepend ( $ key , $ value ) { do { $ result = $ this -> get ( $ key , null , $ cas_token ) ; if ( ! $ result || ! is_string ( $ result ) ) { $ this -> result_code = self :: RES_NOTSTORED ; return false ; } $ result = $ value . $ result ; $ result = $ this -> cas ( $ cas_token , $ key , $ result ) ; } while ( ! $ result && $ this -> result_code == self :: RES_DATA_EXISTS ) ; $ this -> result_code = $ result ? self :: RES_SUCCESS : self :: RES_NOTSTORED ; return $ result ; }
Prepends the given value string to an existing item.

@param string $key The key under which to store the value.
@param string $value The string to prepend.

@return true on success or false on failure.
Prepends the given value string to an existing item .