/** * @param string $publicUserId * @return User */ public function GetUser($publicUserId) { if (!array_key_exists($publicUserId, $this->cache)) { $user = $this->userRepository->LoadByPublicId($publicUserId); $this->cache[$publicUserId] = $user; } return $this->cache[$publicUserId]; }