hasCacheExpired method
Implementation
bool hasCacheExpired(ResponseCacheItem cachedValue, Duration cacheDuration) {
final nowMilliseconds = DateTime.now().millisecondsSinceEpoch;
final cacheExpiryMilliseconds =
nowMilliseconds - cacheDuration.inMilliseconds;
final hasCacheExpired =
cachedValue.cachedMilliseconds < cacheExpiryMilliseconds;
return hasCacheExpired;
}