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 {
final expiresAt = await getTime(key);
if (expiresAt == null) return false;
return DateTime.now().millisecondsSinceEpoch < expiresAt;
}