import '../../../request_cache.dart';
import 'get_participants.dart';
import 'get_participants_response.dart';

class GetParticipantsCache extends SimpleCache<GetParticipantsResponse> {
  GetParticipantsCache({
    required void Function(GetParticipantsResponse) onUpdate,
    required String chatToken,
  }) : super(
         cacheTime: RequestCache.cacheNothing,
         loader: () => GetParticipants(chatToken).run(),
         fromJson: GetParticipantsResponse.fromJson,
         onUpdate: onUpdate,
       ) {
    start('nc-chat-participants-$chatToken');
  }
}
