Redis Future + Rails -


i using redis in 1 of rails project tried union sets of redis like

$redis.smembers('set1') | $redis.smembers('set2')  

but throws error this

undefined method `|' #<redis::future:0x000001306e5830> 

what redis::future? using redis , redis-store gems

thank you

future objects typically returned when methods called in pipeline or transaction.

the returned value available when exec command has been applied redis server. redis-rb, means should exit pipelined or multi block before.

if want select/read data, before multi/exec block, , write in multi/exec block.

by way, more efficient use $redis.sunion() generate result on server-side.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -