getExpiredKeys method
Streams all keys that have expired. The returned Future
completes once the backend has accepted the request (surfacing
any setup failure eagerly); the Stream then yields the keys.
Implementation
@override
@server
Future<Stream<String>> getExpiredKeys() async {
List<String> expiredKeys = <String>[];
final now = DateTime.timestamp();
for (String key in _expiryKeysCache.keys) {
if (_isExpired(key, now: now)) {
expiredKeys.add(key);
}
}
return Stream.fromIterable(expiredKeys);
}