标签: php redis
Redis商店中有两个sorted sets,分数(时间戳)。 我如何从sorted set复制一个元素并插入到其他?
sorted sets
sorted set
我认为这应该像:
$time = time(); $key = 'set1'; $key2 = 'set2'; $data = $redis->zRangeByScore($key, $time, $time); // Get one element by score timestamp $redis->zAdd($key2, $time, $data);