|new([utf8 => 1], [host => localhost], [port => 6379], [path => /tmp/redis.sock])||
Creates a new Redis::hiredis object.
If the host attribute is provided the connect method will automatically be called.
If the path attribute is provided the connect_unix method will automatically be called.
|connect( $hostname, $port )||
$hostname is the hostname of the Redis server to connect to
$port is the port to connect on. Default 6379
|connect_unix( $path )||$path is the path to the unix socket|
|command( $command_and_args )|
|command( [ $command, $arg, ... ] )|
|command( $command, $arg, ... )||
command supports multiple types of calls to be backwards compatible and provide
more convenient use. Examples of how to pass arguments are:
Note that if you have spaces in your values, you must use one of the last 2 forms.
|append_command( $command )||
For performance reasons, its sometimes useful to pipeline commands. When
pipelining, muiltple commands are sent to the server at once and the results
are read as they become available. hiredis supports this via append_command()
and get_reply(). Commands passed to append_command() are buffered locally
until the first call to get_reply() when all the commands are sent to the
server at once. The results are then returned one at a time via calls to
See the hiredis documentation for a more detailed explanation.
Autoload is used to allow an interface like $redis->set(foo, bar). The method name you provide will be passed blindly to Redis, so any supported command should work.
Note that to use any autoloaded method, you must pass arguments as an array, the string and array ref forms supported by command will not work.
The Redis command reference can be found here: <http://redis.io/commands>
A discusion of pipelining can be found here: <http://redis.io/topics/pipelining>
Documentation on the hiredis client can be found here: <https://github.com/antirez/hiredis>
Redis::hiredis on github: <https://github.com/neophenix/redis-hiredis>
|perl v5.20.3||REDIS::HIREDIS (3)||2013-04-02|