lifetime; } public function getKey($id = null) { return "chapter:{$id}"; } public function getContent($id = null) { $chapterRepo = new ChapterRepo(); $chapter = $chapterRepo->findById($id); if (!$chapter) { return new \stdClass(); } return $chapter; } }