containsKey method

  1. @override
Future<bool> containsKey(
  1. String key
)
override

Determines if the Cache contains an entry for the specified key.

  • key: key whose presence in this cache is to be tested.

Returns true if this Cache contains a mapping for the specified key and the value is not expired

Implementation

@override
Future<bool> containsKey(String key) {
  return _getStorageEntry(key).then((entry) {
    return entry != null && !entry.isExpired(clock.now());
  });
}