import '../../../request_cache.dart';
import 'get_room.dart';
import 'get_room_params.dart';
import 'get_room_response.dart';

class GetRoomCache extends SimpleCache<GetRoomResponse> {
  GetRoomCache({super.onUpdate, super.onError, super.renew})
    : super(
        cacheTime: RequestCache.cacheMinute,
        loader: () => GetRoom(GetRoomParams(includeStatus: true)).run(),
        fromJson: GetRoomResponse.fromJson,
      ) {
    start('nc-rooms');
  }
}
