php - How copy element of sorted set to other sorted set? -


there 2 sorted sets in redis store scores (timestamp). how can copy 1 element sorted set , insert other?

i think should as:

$time = time(); $key = 'set1'; $key2 = 'set2';  $data = $redis->zrangebyscore($key, $time, $time); // 1 element score timestamp  $redis->zadd($key2, $time, $data); 


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -