keys_pattern function inside redis_key.cpp is not working correclty
tm185121 opened this issue · 3 comments
Sub: keys_pattern function inside redis_key.cpp is not working correclty
I have a cache of type Settings at zero index.
Inside that I have 4 key, values.
==
127.0.0.1:6379[2]> select 0
OK
127.0.0.1:6379> keys *
- "Settings_2022.12.12.19.03.15.647.json"
- "Settings_2022.12.12.17.46.29.028.json"
- "Settings_2022.12.14.13.55.25.880.json"
- "Settings_2022.12.12.21.15.44.710.json"
127.0.0.1:6379> keys Settings_* - "Settings_2022.12.12.19.03.15.647.json"
- "Settings_2022.12.12.17.46.29.028.json"
- "Settings_2022.12.14.13.55.25.880.json"
- "Settings_2022.12.12.21.15.44.710.json"
====
However , when I am trying to get the keys matching the pattern -> "Settings_*" using keys_pattern function which is inside redis_key,cpp..it is always retuning "-1".
Attached the debuggin screenshot for reference. Could you please comment.
When some error happened, you can use redis.result_error() to get the error info.
Hi,
Thanks for your reply.
I did print that error message...and i see it says => "The operation completed successfully".
However, the number of entries matching the key is -1.
Its seen in the screenshot attached too
Thanks
Tri
Got the output using acl::redis.
Closing this issue