public function getValue($key) { if ($this->isLogin()) { $result = parent::getValue($key); //如果永久数据中不存在,则读取未登录状态下的会话数据(零时数据),并存入永久数据中 if ($result) { return $result; } $value = $this->getCache($key); parent::setValue($value); return $value; } return $this->getCache($key); }