checkCache method
check time storage if cached data exists and is valid
key
- the key used to store the data
data
- string version of the data to be stored
Implementation
@override
Future<bool> checkCache(String key) async {
var time = cacheTimeBox.getKey<Object>(key)?.asInt;
// print('cache: $key, $time');
if (time == null) return false;
return !time.isPast;
}