Skip to content

Instantly share code, notes, and snippets.

@sh1nj1
Created February 18, 2022 00:47
Show Gist options
  • Save sh1nj1/7066f0212817d45619bf70ee19cf9749 to your computer and use it in GitHub Desktop.
Save sh1nj1/7066f0212817d45619bf70ee19cf9749 to your computer and use it in GitHub Desktop.
read-redisson-hash-by-redis-cli
redis-cli eval "return redis.call('hset', KEYS[1], KEYS[2], struct.pack('dLc0', 0.0, string.len(ARGV[1]), ARGV[1]))" 2 "test-map" "key1" '{"value":"hello world"}'
redis-cli eval "local value = redis.call('hget', KEYS[1], KEYS[2]); local t, val = struct.unpack('dLc0', value); return val;" 2 "test-map" "key1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment