import redis from "apigo.cc/apigo/plugins/redis" redis.set('aaa', 111) let aaa = redis.get('aaa') if(aaa !== 111) throw new Error('aaa is '+aaa+' not 111') redis.set('bbb', '222') let bbb = redis.get('bbb') if(bbb !== 222) throw new Error('bbb is '+bbb+' not 222') redis.set('bbb', 'b222') bbb = redis.get('bbb') if(bbb !== 'b222') throw new Error('bbb is '+bbb+' not b222') let rd = redis.fetch("bak") rd.hSet("hh", "aaa", "111") rd.hSet("hh", "bbb", "b222") let hh = rd.hGetAll("hh") if(hh.aaa !== 111) throw new Error('hh.aaa is '+hh.aaa+' not 111') if(bbb !== 'b222') throw new Error('bbb is '+bbb+' not b222') return true