/** * @param $k * @param $v * @param null $ttl * @return bool */ public function set($k, $v = null, $ttl = null) { if (is_array($k)) { return $this->client->mset($k); } if ($ttl) { return $this->client->setex($k, $ttl, $v); } else { return $this->client->set($k, $v); } }