lifetime; } public function getKey($id = null) { return "comment_counter:{$id}"; } public function getContent($id = null) { $commentRepo = new CommentRepo(); $comment = $commentRepo->findById($id); if (!$comment) return null; return [ 'reply_count' => $comment->reply_count, 'agree_count' => $comment->agree_count, 'oppose_count' => $comment->oppose_count, ]; } }