Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/features/redis/redis_keys_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ class _RedisKeysViewState extends material.State<RedisKeysView> {
count: 100,
);

// Fetch type and TTL for each key
final infos = <_KeyInfo>[];
for (final name in keyNames) {
// Fetch type and TTL for each key concurrently
final futures = keyNames.map((name) async {
try {
final type = await widget.connection.keyType(name);
final ttl = await widget.connection.ttl(name);
infos.add(_KeyInfo(name: name, type: type, ttl: ttl));
return _KeyInfo(name: name, type: type, ttl: ttl);
} catch (_) {
infos.add(_KeyInfo(name: name, type: 'unknown', ttl: -1));
return _KeyInfo(name: name, type: 'unknown', ttl: -1);
}
}
});
final infos = await Future.wait(futures);

if (!mounted) return;
setState(() {
Expand Down
Loading