I have the following script (hopefully to return a key AND a value):
var script = @"
local t = {}
for k,v in ipairs(KEYS) do
if redis.call('exists', v) == 1 then
t[v] = redis.call('get', v)
end
end
return t
";
I am using StackExchange.Redis so I am evaluating the return like:
foreach(RedisResult result in (RedisResult[])cache.ScriptEvaluate(script, newkeys)) {
I see that I can cast the RedisResult to a RedisKey or RedisValue but there doesn't seem to be a way to access both. So my question is twofold. One, can I expect the script to return a key and value? Two, Should I expect an array of RedisResult like I have shown above? If so how do I get the key and value? Ideas?
Thank you.