= config('livestreaming.comments.max_falloff')) { Redis::rpop($key); } } return Redis::lpush($key, $val); } public static function commentsCount($id) { $key = self::CACHE_KEY . 'chat:' . $id; return Redis::llen($key); } public static function deleteComment($id, $val) { $key = self::CACHE_KEY . 'chat:' . $id; return Redis::lrem($key, 0, $val); } public static function clearChat($id) { $key = self::CACHE_KEY . 'chat:' . $id; return Redis::del($key); } }