forked from Shopify/wolverine
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Burke Libbey
committed
Mar 2, 2012
1 parent
d976a97
commit 580268d
Showing
3 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
local exists = {} | ||
local existence | ||
for _, key in ipairs(KEYS) do | ||
table.insert(exists, redis.call('exists', key)) | ||
table.insert(exists, redis.call('exists', key)) | ||
end | ||
return exists | ||
return exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
local hash, key, value | ||
for i = 1, #KEYS, 3 do | ||
hash = KEYS[i] | ||
key = KEYS[i + 1] | ||
value = KEYS[i + 2] | ||
redis.call('hset', hash, key, value) | ||
end | ||
return "OK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
local hash, key, value | ||
for i = 1, #KEYS, 3 do | ||
hash = KEYS[i] | ||
key = KEYS[i + 1] | ||
value = KEYS[i + 2] | ||
redis.call('hsetnx', hash, key, value) | ||
end | ||
return "OK" |