1

I have this:

$ redis-cli -n 2 -h "$host" GET events:from_bitbucket:fc2c0983-d0f2-4211-aa2e-5382afd9b288
"[object Object]"

$ redis-cli -n 2 -h "$host" GET 'events:from_bitbucket:*'
(nil)

why does the first query work, but the second query responds with (nil)? Makes no sense. Same host and everything.

2 Answers2

0

I think the issue is that GET doesn't support wildcards. You could try something like this:

redis-cli <<< "scan 0 MATCH events:from_bitbucket:*"

Sample Output

1) "0"
2) 1) "events:from_bitbucket:fc2c0983-d0f2-4211-aa2e-5382afd9b288"
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
0

I think one good answer is simply:

redis-cli -n 2 -h "$host" KEYS 'events:from_bitbucket:*'

of course this only gives you all the matching keys, not the values.