Revisions
-
fritzy created this gist
Nov 6, 2013 .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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ --EVAL 'this script' 1 some-key local key = KEYS[1]; local value = redis.call('GET', key); local jvalue = cjson.encode(cmsgpack.unpack(value)); return jvalue; 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ --EVAL 'this script' 1 some-key '{"some": "json"}' local key = KEYS[1]; local value = ARGV[1]; local mvalue = cmsgpack.pack(cjson.decode(value)); return redis.call('SET', key, mvalue);