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