1
我希望這個列表適合於提問有關redis客戶端「hiredis」的問題。 我想用redis客戶端實現同樣的功能。可以看出,redis使用一次rpush調用發送3條不同的記錄。使用hiredis通過一次呼叫發送多條記錄
redis 127.0.0.1:6379> rpush test kemal erdem husyin
(integer) 3
redis 127.0.0.1:6379> lrange test 0 -1
1) "kemal"
2) "erdem"
3) "husyin"
在項目中,我使用hiredis一個例子:
reply = (redisReply*)(redisCommand(c, "RPUSH %s %s" , channelName, message));
,但現在我有每一行正在保持像char[][]
一個BUFF一個很大的日誌文件; 我需要發送每行作爲不同的記錄,但也需要調用rpush一次性能。你有什麼建議嗎?