/** * append value. * @param key (string) * @param value (string) * @param expire time (int) * @return [success|fail] (bool) */ public function append($key, $value, $exptime) { $result = rmc_append($key, $value, $exptime); return $result == RomaClient::STORED ? True : False; }
/** * @brief Append value.(Issue 'append' command). * @param key * @param value * @param exptime Specify the value of expire second. * @return Returns True if success. */ public function append($key, $value, $exptime) { $result = rmc_append($this->client_id, $key, $value, $exptime, $this->default_timeout); if (is_null($result) || $result == RomaClient::RMC_RET_EXCEPTION) { throw new Exception("rmc_append() failure"); } else { if ($result == RomaClient::RMC_RET_ERROR) { return False; } } return True; }