key = AdminRedisKey::adminSectionList(); } /** * @return array * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface * @throws RedisException */ public function getList(): array { if ($this->redis->exists($this->key,RedisCode::SYSTEM_DB)) { return json_decode($this->redis->get($this->key,RedisCode::SYSTEM_DB),true); } $allList = $this->adminSectionModel->getList(); $data = $this->getDbList($allList); $this->redis->set($this->key,json_encode($data),RedisCode::SYSTEM_DB); return $data; } /** * @return void * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface * @throws RedisException */ public function delList() { $this->redis->delete($this->key,RedisCode::SYSTEM_DB); } }