redis加載lua腳本的示例:
基本用法:
EVAL script numkeys key [key ...] arg [arg ...]
numkeys 是key的個數,后邊接著寫key1 key2... val1 val2....,舉例:
127.0.0.1:6379> eval "return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}" 2 key1 key2 val1 val21) "key1"2) "key2"3) "val1"4) "val2"
127.0.0.1:6379> eval "return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}" 2 key1 key2 val1 val2
1) "key1"
2) "key2"
3) "val1"
4) "val2"
億速云公眾號
手機網站二維碼
Copyright ? Yisu Cloud Ltd. All Rights Reserved. 2018 版權所有
廣州億速云計算有限公司粵ICP備17096448號-1 粵公網安備 44010402001142號增值電信業務經營許可證編號:B1-20181529