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