lua-resty-redis
lua-resty-redis copied to clipboard
Lua redis client driver for the ngx_lua based on the cosocket API
local redis = require "resty.redis" local red = redis:new() red:set_timeout(1000) -- 1 sec local ok, err = red:connect("127.0.0.1", 6379) if not ok then ngx.say("failed to connect: ", err) return end...
13561#0: *31675425 lua tcp socket read timed out, client: 100.97.177.53, server: localhost lua redis的链接是否使用连接池?如果同时并发数量过高是否有排队功能?
Hello, After reading the issue #23 I have updated my configuration to the following: https://gist.github.com/frozenminds/5a1f0b9047c7af69ec61 Each SSI request will try to get the content from Redis, if key is not...
rockfile for luarocks.
local res, err hmget(mykey, "one", "two", "three") then `res.one` (not worked) when mykey not exists,the below code not worked ``` if (res[2] ~= nil) then ngx.say('exists') -- when mykey not...
现在 red:hmget 传入的是可变参数,能否想hmset一样传入数组啊,或者安装redis 原生的命令 hmget hashname field1 field2?
I'm using 2.8.17 redis server. Send requests throw unix.sock by nginx+lua. Each request is one SMEMBERS command. Now I have about 1k req per sec. In the nginx access log...
I've came across a very specific scenario where due to a high volume of write requests, calling `tcpsock:receive` after every operation was too expensive. In this scenario, counters on Redis...
Hi there, Is there any "legal" way to connect to redis from a worker created via the new `init_worker_by_lua* directives`? Anything I try gives me the `"API disabled in the...
I'm trying to cache errors on connect to a redis instance both by using ok, err = .... and wrapping up the code with a pcall In both cases still...