cache fix
This commit is contained in:
parent
7cb1fc0543
commit
ce2fb89ccf
|
@ -2644,11 +2644,13 @@ class CutoffTetrio {
|
||||||
}
|
}
|
||||||
|
|
||||||
class CutoffsTetrio {
|
class CutoffsTetrio {
|
||||||
|
late String id;
|
||||||
late DateTime timestamp;
|
late DateTime timestamp;
|
||||||
late int total;
|
late int total;
|
||||||
Map<String, CutoffTetrio> data = {};
|
Map<String, CutoffTetrio> data = {};
|
||||||
|
|
||||||
CutoffsTetrio.fromJson(Map<String, dynamic> json){
|
CutoffsTetrio.fromJson(Map<String, dynamic> json){
|
||||||
|
id = json['s'];
|
||||||
timestamp = DateTime.parse(json['t']);
|
timestamp = DateTime.parse(json['t']);
|
||||||
total = json['data']['total'];
|
total = json['data']['total'];
|
||||||
json['data'].remove("total");
|
json['data'].remove("total");
|
||||||
|
|
|
@ -408,7 +408,7 @@ class TetrioService extends DB {
|
||||||
// so i'm going to document only unique differences between them
|
// so i'm going to document only unique differences between them
|
||||||
|
|
||||||
Future<CutoffsTetrio?> fetchCutoffsTetrio() async {
|
Future<CutoffsTetrio?> fetchCutoffsTetrio() async {
|
||||||
CutoffsTetrio? cached = _cache.get("", CutoffsTetrio);
|
CutoffsTetrio? cached = _cache.get("league_ranks", CutoffsTetrio);
|
||||||
if (cached != null) return cached;
|
if (cached != null) return cached;
|
||||||
|
|
||||||
Uri url;
|
Uri url;
|
||||||
|
|
Loading…
Reference in New Issue