We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075bfe9 commit b8c8724Copy full SHA for b8c8724
lua_ad/libs/redis.lua
@@ -1,10 +1,9 @@
1
local redis = require "resty.iredis"
2
3
-local red = redis:new({["ip"]="10.0.61.51", ["port"]=6379})
4
-
5
local _M = {}
6
7
function _M.get_from_redis(key)
+ local red = redis:new({["ip"]="10.0.61.51", ["port"]=6379})
8
local res, err = red:get(key)
9
if res then
10
return res
@@ -14,6 +13,7 @@ function _M.get_from_redis(key)
14
13
end
15
16
function _M.mget_from_redis(args)
17
local res, err = red:mget(unpack(args))
18
19
0 commit comments