Skip to content

Commit 2564138

Browse files
committed
optimize: reduced table.concat() calls while constructing memcached requests, which can lead to fewer Lua string creation operations.
1 parent 3ae28d1 commit 2564138

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/resty/memcached.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ local function _multi_get(self, keys)
9696

9797
-- print("multi get cmd: ", cmd)
9898

99-
local bytes, err = sock:send(concat(cmd))
99+
local bytes, err = sock:send(cmd)
100100
if not bytes then
101101
return nil, err
102102
end
@@ -225,7 +225,7 @@ local function _multi_gets(self, keys)
225225

226226
-- print("multi get cmd: ", cmd)
227227

228-
local bytes, err = sock:send(concat(cmd))
228+
local bytes, err = sock:send(cmd)
229229
if not bytes then
230230
return nil, err
231231
end

0 commit comments

Comments
 (0)