handler = $handler; } /** * @param string $key * @return Promise */ public function get(string $key): Promise { return $this->handler->request('xcache/get', ['key' => $key]); } /** * @param string $key * @param mixed $value * @return Promise */ public function set(string $key, $value): Promise { return $this->handler->notify('xcache/set', ['key' => $key, 'value' => $value]); } }