Browse Redis keys with SCAN
DevOpsPad lists Redis keys with SCAN <cursor> MATCH <pattern> COUNT 100, never KEYS. Each request returns one batch and a cursor. While the cursor is not 0, the Explorer shows Load more keys, which continues from where the last batch ended.
Type a glob pattern such as session:* in the Key pattern box and press Enter to scan only matching keys. An empty box means *.
Browse and filter
- Select a Redis connection in the Explorer. The first batch of keys loads automatically.
- Enter a pattern in the key pattern box (it shows
Key pattern: *when empty) and press Enter or click the search button. Patterns use Redis glob syntax:*,?,[abc]. - Click Load more keys until it disappears. The cursor has then returned to
0and the scan is complete.
Keys are sorted by name within what has been loaded. Click a key to open a query tab with ["TYPE", "<key>"], or click its inspect button for Key details.
| Pattern | Matches |
|---|---|
user:* |
user:1, user:42:profile |
session:?? |
session:ab, not session:abc |
cache:[ab]* |
keys starting with cache:a or cache:b |
Patterns can be up to 1,024 characters.
Why batches look uneven
SCAN makes guarantees that differ from a list query:
COUNTis a hint, not a page size. Redis may return more or fewer than 100 keys per call.- A batch can be empty. With
MATCH, Redis filters after reading a slice of the keyspace, so a slice with no matches returns nothing while the cursor moves on. The Explorer notes:SCAN may return an empty batch before it reaches the end. - Keys can repeat. If the keyspace is rehashed during a scan, Redis may return a key twice. DevOpsPad removes duplicates from the displayed list.
- Keys can change. Keys added or deleted during a scan may or may not appear.
Key details
The inspector shows the key’s Type, its TTL in milliseconds or No expiration, and the database index. The value preview is bounded:
| Type | Preview |
|---|---|
| string | first 64 KiB (GETRANGE 0 65535) |
| hash | first HSCAN batch (COUNT 100) |
| set | first SSCAN batch |
| sorted set | first ZSCAN batch, with scores |
| list | first 100 items (LRANGE 0 99) |
| stream | first 100 entries (XRANGE - + COUNT 100) |
Module types such as RedisJSON show no preview. To read further into a large hash or set, run the next HSCAN / SSCAN / ZSCAN with the cursor the inspector shows, in the query editor.
If a key expires while you look at it, the inspector says This key has expired or no longer exists.
Limits
- Scans run against the connection’s database index only.
- Redis Cluster is not supported, so keys are scanned on one node.
Frequently asked questions
Why does DevOpsPad not use KEYS to list Redis keys?
KEYS walks the whole keyspace in one blocking call and can stall a busy server. SCAN returns small batches and keeps a cursor, so the server stays responsive.
Why did the key list show no keys even though the database has data?
SCAN can return an empty batch before it reaches the end, especially with a narrow MATCH pattern. Click Load more keys to continue the scan.