
Using a Pipeline is more efficient than the send/wait approach, but not as convenient. It would be most efficient to use ReadPipeline there but you could FlushPipeline instead. If you prefer, you can use the ResponseInPipeline event to get waiting results. ResultCount will let you know what's available in the queue. It's up to you to get the results later by issuing FlushPipleline (wait until all the expected results come in and return them at once) or ReadPipeline (get any results that might be waiting).

The difference is that commands will be accumulated up to PipelineCount and sent at once without waiting for a reply. Any value greater than zero will activate Pipeline mode. Redis_MTC allows "pipelines", activated through StartPipelines( cnt ). In some cases, the M_Redis module has functions that can help. Results from Execute are always a Variant and it's up to you to interpret them. V = r.Execute( "SET mykey myvalue EX 3" ) // Inline Don't confuse the two.įor example, if you wanted to ignore the built-in Set and issue your own, you might do it in one of these ways: Note: There is also an Exec method that is part of Redis' transaction system. Use Execute for this, but be sure to give the command inline (all in the first parameter) or split each part up into the parameters array. The class does not implement every Redis command so you might need to issue your own. Almost everything has been implemented so look around before turning to. For example, instead of a function called MSET, you will find instead SetMultiple, and BITOP has BitAnd, BitOr, and BitXor. There are some exceptions where Redis_MTC tries to make things clearer. The class implements the commands that a Redis server understands pretty closely. It also has DefaultAddress and DefaultPort that can be filled in at design time through the Inspector. You must call Connect and can implement its additional events.

The other class, RedisControl_MTC, is meant to use as a control on a Window or similar. Note: If the class cannot connect on instantiation, it will raise an Exception. R = new Redis_MTC( "", "", 9999 ) // Custom port on localhost

R = new Redis_MTC // no password, localhost, default port
