import '../../../request_cache.dart'; import 'get_chat.dart'; import 'get_chat_params.dart'; import 'get_chat_response.dart'; class GetChatCache extends SimpleCache { GetChatCache({ super.onCacheData, super.onNetworkData, super.onError, required String chatToken, }) : super( cacheTime: RequestCache.cacheNothing, loader: () => GetChat( chatToken, GetChatParams( lookIntoFuture: GetChatParamsSwitch.off, setReadMarker: GetChatParamsSwitch.on, limit: 200, ), ).run(), fromJson: GetChatResponse.fromJson, ) { start('nc-chat-$chatToken'); } }