public function setex($key, $ttl, $value) { if (!$this->connected) { return false; } $this->storeData($key, $value); return true; }