lifetime; } public function getKey($id = null) { return "course:{$id}"; } public function getContent($id = null) { $courseRepo = new CourseRepo(); $course = $courseRepo->findById($id); $course->cover = kg_ci_img_url($course->cover); if (!$course) { return new \stdClass(); } return $course; } }