Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magic-api关于redis操作的2个小问题咨询 #94

Open
xiaojinhe2 opened this issue Nov 21, 2023 · 0 comments
Open

magic-api关于redis操作的2个小问题咨询 #94

xiaojinhe2 opened this issue Nov 21, 2023 · 0 comments

Comments

@xiaojinhe2
Copy link

(1)使用redis的set集合时,使用return redis.smembers('magic-api');读取容器里面元素值,结果返回如下:
{
"code": 200,
"message": "success",
"data": [
"dGVzdDI=",
"dGVzdDE=",
"dGVzdDM="
]
}
元素值都是被base64加密过的,请问这个是正常的么?

(2)使用redis.srandmember('magic-api',2)随机获取2个元素值时,返回结果如下:
{
"code": 200,
"message": "success",
"data": "test2"
}
元素值没有base64加密,而且一直都只能返回一个值,我前面设置的需要随机取2个值的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant