saveTime method
save expiry time in milliseconds for this data
key - the key used to store the data
duration - duration of cache in seconds
Implementation
@override
void saveTime(String? key, int? duration) {
  if (key != null && key.isNotEmpty && duration != null && !duration.isNaN) {
    cacheTimeBox.addAll({key: duration});
  }
}