localred=redis:new()localok,err=red:set("dog","an animal")ifnotokthenngx.say("failed to set dog: ",err)returnendngx.say("set result: ",ok)localres,err=red:get("dog")ifnotresthenngx.say("failed to get dog: ",err)returnendifres==ngx.nullthenngx.say("dog not found.")returnendngx.say("dog: ",res)