import 'dart:convert';
import '../../../requestCache.dart';
import 'getBreakers.dart';
import 'getBreakersResponse.dart';


class GetBreakersCache extends RequestCache<GetBreakersResponse> {
  GetBreakersCache({onUpdate, renew}) : super(RequestCache.cacheMinute, onUpdate, renew: renew) {
    start('MarianumMobile', 'breakers');
  }

  @override
  GetBreakersResponse onLocalData(String json) => GetBreakersResponse.fromJson(jsonDecode(json));

  @override
  Future<GetBreakersResponse> onLoad() => GetBreakers().run();
}
