get method

  1. @override
Future get(
  1. String key, {
  2. Duration? expiryDuration,
})
override

Returns the cache value for the specified key. If specified expiryDuration is used instead of the configured expiry policy duration

  • key: the key
  • expiryDuration: Expiry duration to be used in place of the configured expiry policy duration

Implementation

@override
Future<dynamic> get(String key, {Duration? expiryDuration}) {
  return _primary.get(key, expiryDuration: expiryDuration).then((value) =>
      value != null
          ? Future.value(value)
          : _secondary.get(key, expiryDuration: expiryDuration));
}