{"id":33193259,"url":"https://github.com/PerlRedis/perl-redis","last_synced_at":"2025-11-21T01:00:47.009Z","repository":{"id":1359890,"uuid":"1308463","full_name":"PerlRedis/perl-redis","owner":"PerlRedis","description":"Perl binding for Redis database","archived":false,"fork":false,"pushed_at":"2024-06-18T08:38:07.000Z","size":966,"stargazers_count":109,"open_issues_count":37,"forks_count":66,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-10-22T09:35:08.688Z","etag":null,"topics":["perl","redis"],"latest_commit_sha":null,"homepage":"http://metacpan.org/release/Redis/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerlRedis.png","metadata":{"files":{"readme":"README.pod","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-01-30T09:04:58.000Z","updated_at":"2025-08-28T19:15:44.000Z","dependencies_parsed_at":"2024-01-06T23:58:46.063Z","dependency_job_id":"6ffc411f-c606-49ac-80bd-0bd46b6bc4e8","html_url":"https://github.com/PerlRedis/perl-redis","commit_stats":{"total_commits":511,"total_committers":48,"mean_commits":"10.645833333333334","dds":0.6810176125244618,"last_synced_commit":"0c6102251a431b47ebc106aa13df97ca1fabaab6"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/PerlRedis/perl-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlRedis%2Fperl-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlRedis%2Fperl-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlRedis%2Fperl-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlRedis%2Fperl-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerlRedis","download_url":"https://codeload.github.com/PerlRedis/perl-redis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlRedis%2Fperl-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285538230,"owners_count":27188646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["perl","redis"],"created_at":"2025-11-16T07:00:30.424Z","updated_at":"2025-11-21T01:00:46.999Z","avatar_url":"https://github.com/PerlRedis.png","language":"Perl","funding_links":[],"categories":["Haskell"],"sub_categories":["Perl"],"readme":"=pod\n\n=encoding UTF-8\n\n=head1 NAME\n\nRedis - Perl binding for Redis database\n\n=head1 VERSION\n\nversion 2.000\n\n=head1 SYNOPSIS\n\n    ## Defaults to $ENV{REDIS_SERVER} or 127.0.0.1:6379\n    my $redis = Redis-\u003enew;\n\n    my $redis = Redis-\u003enew(server =\u003e 'redis.example.com:8080');\n\n    ## Set the connection name (requires Redis 2.6.9)\n    my $redis = Redis-\u003enew(\n      server =\u003e 'redis.example.com:8080',\n      name =\u003e 'my_connection_name',\n    );\n    my $generation = 0;\n    my $redis = Redis-\u003enew(\n      server =\u003e 'redis.example.com:8080',\n      name =\u003e sub { \"cache-$$-\".++$generation },\n    );\n\n    ## Use UNIX domain socket\n    my $redis = Redis-\u003enew(sock =\u003e '/path/to/socket');\n\n    ## Connect to Redis over a secure SSL/TLS channel.  See\n    ## IO::Socket::SSL documentation for more information\n    ## about SSL_verify_mode parameter.\n    my $redis = Redis-\u003enew(\n        server =\u003e 'redis.tls.example.com:8080',\n        ssl =\u003e 1,\n        SSL_verify_mode =\u003e SSL_VERIFY_PEER,\n    );\n\n    ## Enable auto-reconnect\n    ## Try to reconnect every 1s up to 60 seconds until success\n    ## Die if you can't after that\n    my $redis = Redis-\u003enew(reconnect =\u003e 60, every =\u003e 1_000_000);\n\n    ## Try each 100ms up to 2 seconds (every is in microseconds)\n    my $redis = Redis-\u003enew(reconnect =\u003e 2, every =\u003e 100_000);\n\n    ## Enable connection timeout (in seconds)\n    my $redis = Redis-\u003enew(cnx_timeout =\u003e 60);\n\n    ## Enable read timeout (in seconds)\n    my $redis = Redis-\u003enew(read_timeout =\u003e 0.5);\n\n    ## Enable write timeout (in seconds)\n    my $redis = Redis-\u003enew(write_timeout =\u003e 1.2);\n\n    ## Connect via a list of Sentinels to a given service\n    my $redis = Redis-\u003enew(sentinels =\u003e [ '127.0.0.1:12345' ], service =\u003e 'mymaster');\n\n    ## Same, but with connection, read and write timeout on the sentinel hosts\n    my $redis = Redis-\u003enew( sentinels =\u003e [ '127.0.0.1:12345' ], service =\u003e 'mymaster',\n                            sentinels_cnx_timeout =\u003e 0.1,\n                            sentinels_read_timeout =\u003e 1,\n                            sentinels_write_timeout =\u003e 1,\n                          );\n\n    ## Use all the regular Redis commands, they all accept a list of\n    ## arguments\n    ## See https://redis.io/commands for full list\n    $redis-\u003eget('key');\n    $redis-\u003eset('key' =\u003e 'value');\n    $redis-\u003esort('list', 'DESC');\n    $redis-\u003esort(qw{list LIMIT 0 5 ALPHA DESC});\n\n    ## Add a coderef argument to run a command in the background\n    $redis-\u003esort(qw{list LIMIT 0 5 ALPHA DESC}, sub {\n      my ($reply, $error) = @_;\n      die \"Oops, got an error: $error\\n\" if defined $error;\n      print \"$_\\n\" for @$reply;\n    });\n    long_computation();\n    $redis-\u003ewait_all_responses;\n    ## or\n    $redis-\u003ewait_one_response();\n\n    ## Or run a large batch of commands in a pipeline\n    my %hash = _get_large_batch_of_commands();\n    $redis-\u003ehset('h', $_, $hash{$_}, sub {}) for keys %hash;\n    $redis-\u003ewait_all_responses;\n\n    ## Publish/Subscribe\n    $redis-\u003esubscribe(\n      'topic_1',\n      'topic_2',\n      sub {\n        my ($message, $topic, $subscribed_topic) = @_\n\n          ## $subscribed_topic can be different from topic if\n          ## you use psubscribe() with wildcards\n      }\n    );\n    $redis-\u003epsubscribe('nasdaq.*', sub {...});\n\n    ## Blocks and waits for messages, calls subscribe() callbacks\n    ##  ... forever\n    my $timeout = 10;\n    $redis-\u003ewait_for_messages($timeout) while 1;\n\n    ##  ... until some condition\n    my $keep_going = 1; ## other code will set to false to quit\n    $redis-\u003ewait_for_messages($timeout) while $keep_going;\n\n    $redis-\u003epublish('topic_1', 'message');\n\n=head1 DESCRIPTION\n\nPure perl bindings for L\u003chttps://redis.io/\u003e\n\nThis version supports protocol 2.x (multi-bulk) or later of Redis available at\nL\u003chttps://github.com/antirez/redis/\u003e.\n\nThis documentation lists commands which are exercised in test suite, but\nadditional commands will work correctly since protocol specifies enough\ninformation to support almost all commands with same piece of code with a\nlittle help of C\u003cAUTOLOAD\u003e.\n\n=head1 PIPELINING\n\nUsually, running a command will wait for a response.  However, if you're doing\nlarge numbers of requests, it can be more efficient to use what Redis calls\nI\u003cpipelining\u003e: send multiple commands to Redis without waiting for a response,\nthen wait for the responses that come in.\n\nTo use pipelining, add a coderef argument as the last argument to a command\nmethod call:\n\n  $r-\u003eset('foo', 'bar', sub {});\n\nPending responses to pipelined commands are processed in a single batch, as\nsoon as at least one of the following conditions holds:\n\n=over\n\n=item *\n\nA non-pipelined (synchronous) command is called on the same connection\n\n=item *\n\nA pub/sub subscription command (one of C\u003csubscribe\u003e, C\u003cunsubscribe\u003e,\nC\u003cpsubscribe\u003e, or C\u003cpunsubscribe\u003e) is about to be called on the same\nconnection.\n\n=item *\n\nOne of L\u003c/wait_all_responses\u003e or L\u003c/wait_one_response\u003e methods is called\nexplicitly.\n\n=back\n\nThe coderef you supply to a pipelined command method is invoked once the\nresponse is available.  It takes two arguments, C\u003c$reply\u003e and C\u003c$error\u003e.  If\nC\u003c$error\u003e is defined, it contains the text of an error reply sent by the Redis\nserver.  Otherwise, C\u003c$reply\u003e is the non-error reply. For almost all commands,\nthat means it's C\u003cundef\u003e, or a defined but non-reference scalar, or an array\nref of any of those; but see L\u003c/keys\u003e, L\u003c/info\u003e, and L\u003c/exec\u003e.\n\nNote the contrast with synchronous commands, which throw an exception on\nreceipt of an error reply, or return a non-error reply directly.\n\nThe fact that pipelined commands never throw an exception can be particularly\nuseful for Redis transactions; see L\u003c/exec\u003e.\n\n=head1 ENCODING\n\nThere is no encoding feature anymore, it has been deprecated and finally\nremoved. This module consider that any data sent to the Redis server is a binary data.\nAnd it doesn't do anything when getting data from the Redis server.\n\nSo, if you are working with character strings, you should pre-encode or post-decode it if needed !\n\n=head1 CONSTRUCTOR\n\n=head2 new\n\n    my $r = Redis-\u003enew; # $ENV{REDIS_SERVER} or 127.0.0.1:6379\n\n    my $r = Redis-\u003enew( server =\u003e '192.168.0.1:6379', debug =\u003e 0 );\n    my $r = Redis-\u003enew( server =\u003e '192.168.0.1:6379', encoding =\u003e undef );\n    my $r = Redis-\u003enew( server =\u003e '192.168.0.1:6379', ssl =\u003e 1, SSL_verify_mode =\u003e SSL_VERIFY_PEER );\n    my $r = Redis-\u003enew( sock =\u003e '/path/to/sock' );\n    my $r = Redis-\u003enew( reconnect =\u003e 60, every =\u003e 5000 );\n    my $r = Redis-\u003enew( password =\u003e 'boo' );\n    my $r = Redis-\u003enew( on_connect =\u003e sub { my ($redis) = @_; ... } );\n    my $r = Redis-\u003enew( name =\u003e 'my_connection_name' );\n    my $r = Redis-\u003enew( name =\u003e sub { \"cache-for-$$\" });\n\n    my $redis = Redis-\u003enew(sentinels =\u003e [ '127.0.0.1:12345', '127.0.0.1:23456' ],\n                           service =\u003e 'mymaster');\n\n    ## Connect via a list of Sentinels to a given service\n    my $redis = Redis-\u003enew(sentinels =\u003e [ '127.0.0.1:12345' ], service =\u003e 'mymaster');\n\n    ## Same, but with connection, read and write timeout on the sentinel hosts\n    my $redis = Redis-\u003enew( sentinels =\u003e [ '127.0.0.1:12345' ], service =\u003e 'mymaster',\n                            sentinels_cnx_timeout =\u003e 0.1,\n                            sentinels_read_timeout =\u003e 1,\n                            sentinels_write_timeout =\u003e 1,\n                          );\n\n=head3 C\u003c\u003c server \u003e\u003e\n\nThe C\u003c\u003c server \u003e\u003e parameter specifies the Redis server we should connect to,\nvia TCP. Use the 'IP:PORT' format. If no C\u003c\u003c server \u003e\u003e option is present, we\nwill attempt to use the C\u003c\u003c REDIS_SERVER \u003e\u003e environment variable. If neither of\nthose options are present, it defaults to '127.0.0.1:6379'.\n\nAlternatively you can use the C\u003c\u003c sock \u003e\u003e parameter to specify the path of the\nUNIX domain socket where the Redis server is listening.\n\nAlternatively you can use the C\u003c\u003c sentinels \u003e\u003e parameter and the C\u003c\u003c service \u003e\u003e\nparameter to specify a list of sentinels to contact and try to get the address\nof the given service name. C\u003c\u003c sentinels \u003e\u003e must be an ArrayRef and C\u003c\u003c service\n\u003e\u003e an Str.\n\nThe C\u003c\u003c REDIS_SERVER \u003e\u003e can be used for UNIX domain sockets too. The following\nformats are supported:\n\n=over\n\n=item *\n\n/path/to/sock\n\n=item *\n\nunix:/path/to/sock\n\n=item *\n\n127.0.0.1:11011\n\n=item *\n\ntcp:127.0.0.1:11011\n\n=back\n\n=head3 C\u003c\u003c reconnect \u003e\u003e, C\u003c\u003c every \u003e\u003e\n\nThe C\u003c\u003c reconnect \u003e\u003e option enables auto-reconnection mode. If we cannot\nconnect to the Redis server, or if a network write fails, we enter retry mode.\nWe will try a new connection every C\u003c\u003c every \u003e\u003e microseconds (1 ms by\ndefault), up-to C\u003c\u003c reconnect \u003e\u003e seconds.\n\nBe aware that read errors will always thrown an exception, and will not trigger\na retry until the new command is sent.\n\nIf we cannot re-establish a connection after C\u003c\u003c reconnect \u003e\u003e seconds, an\nexception will be thrown.\n\n=head3 C\u003c\u003c conservative_reconnect \u003e\u003e\n\nC\u003c\u003c conservative_reconnect \u003e\u003e option makes sure that reconnection is only attempted\nwhen no pending command is ongoing. For instance, if you're doing\nC\u003c\u003c$redis-\u003eincr('key')\u003e\u003e, and if the server properly understood and processed the\ncommand, but the network connection is dropped just before the server replies :\nthe command has been processed but the client doesn't know it. In this\nsituation, if reconnect is enabled, the Redis client will reconnect and send\nthe C\u003cincr\u003e command *again*. If it succeeds, at the end the key as been\nincremented *two* times. To avoid this issue, you can set the C\u003cconservative_reconnect\u003e\noption to a true value. In this case, the client will reconnect only if no\nrequest is pending. Otherwise it will die with the message: C\u003creconnect\ndisabled while responses are pending and safe reconnect mode enabled\u003e.\n\n=head3 C\u003c\u003c cnx_timeout \u003e\u003e\n\nThe C\u003c\u003c cnx_timeout \u003e\u003e option enables connection timeout. The Redis client will\nwait at most that number of seconds (can be fractional) before giving up\nconnecting to a server.\n\n=head3 C\u003c\u003c sentinels_cnx_timeout \u003e\u003e\n\nThe C\u003c\u003c sentinels_cnx_timeout \u003e\u003e option enables sentinel connection timeout.\nWhen using the sentinels feature, Redis client will wait at most that number of\nseconds (can be fractional) before giving up connecting to a sentinel.\nB\u003cDefault\u003e: 0.1\n\n=head3 C\u003c\u003c read_timeout \u003e\u003e\n\nThe C\u003c\u003c read_timeout \u003e\u003e option enables read timeout. The Redis client will wait\nat most that number of seconds (can be fractional) before giving up when\nreading from the server.\n\n=head3 C\u003c\u003c sentinels_read_timeout \u003e\u003e\n\nThe C\u003c\u003c sentinels_read_timeout \u003e\u003e option enables sentinel read timeout. When\nusing the sentinels feature, the Redis client will wait at most that number of\nseconds (can be fractional) before giving up when reading from a sentinel\nserver. B\u003cDefault\u003e: 1\n\n=head3 C\u003c\u003c write_timeout \u003e\u003e\n\nThe C\u003c\u003c write_timeout \u003e\u003e option enables write timeout. The Redis client will wait\nat most that number of seconds (can be fractional) before giving up when\nreading from the server.\n\n=head3 C\u003c\u003c sentinels_write_timeout \u003e\u003e\n\nThe C\u003c\u003c sentinels_write_timeout \u003e\u003e option enables sentinel write timeout. When\nusing the sentinels feature, the Redis client will wait at most that number of\nseconds (can be fractional) before giving up when reading from a sentinel\nserver. B\u003cDefault\u003e: 1\n\n=head3 C\u003c\u003c password \u003e\u003e\n\nIf your Redis server requires authentication, you can use the C\u003c\u003c password \u003e\u003e\nattribute. After each established connection (at the start or when\nreconnecting), the Redis C\u003c\u003c AUTH \u003e\u003e command will be send to the server. If the\npassword is wrong, an exception will be thrown and reconnect will be disabled.\n\n=head3 C\u003c\u003c on_connect \u003e\u003e\n\nYou can also provide a code reference that will be immediately after each\nsuccessful connection. The C\u003c\u003c on_connect \u003e\u003e attribute is used to provide the\ncode reference, and it will be called with the first parameter being the Redis\nobject.\n\n=head3 C\u003c\u003c no_auto_connect_on_new \u003e\u003e\n\nYou can also provide C\u003c\u003c no_auto_connect_on_new \u003e\u003e in which case C\u003c\u003c\nnew \u003e\u003e won't call C\u003c\u003c $obj-\u003econnect \u003e\u003e for you implicitly, you'll have\nto do that yourself. This is useful for figuring out how long\nconnection setup takes so you can configure the C\u003c\u003c cnx_timeout \u003e\u003e\nappropriately.\n\n=head3 C\u003c\u003c no_sentinels_list_update \u003e\u003e\n\nYou can also provide C\u003c\u003c no_sentinels_list_update \u003e\u003e. By default (that is,\nwithout this option), when successfully contacting a sentinel server, the Redis\nclient will ask it for the list of sentinels known for the given service, and\nmerge it with its list of sentinels (in the C\u003c\u003c sentinels \u003e\u003e attribute). You\ncan disable this behavior by setting C\u003c\u003c no_sentinels_list_update \u003e\u003e to a true\nvalue.\n\n=head3 C\u003c\u003c name \u003e\u003e\n\nYou can also set a name for each connection. This can be very useful for\ndebugging purposes, using the C\u003c\u003c CLIENT LIST \u003e\u003e command. To set a connection\nname, use the C\u003c\u003c name \u003e\u003e parameter. You can use both a scalar value or a\nCodeRef. If the latter, it will be called after each connection, with the Redis\nobject, and it should return the connection name to use. If it returns a\nundefined value, Redis will not set the connection name.\n\nPlease note that there are restrictions on the name you can set, the most\nimportant of which is, no spaces. See the L\u003cCLIENT SETNAME\ndocumentation|https://redis.io/commands/client-setname\u003e for all the juicy\ndetails. This feature is safe to use with all versions of Redis servers. If C\u003c\u003c\nCLIENT SETNAME \u003e\u003e support is not available (Redis servers 2.6.9 and above\nonly), the name parameter is ignored.\n\n=head3 C\u003c\u003c ssl \u003e\u003e\n\nYou can connect to Redis over SSL/TLS by setting this flag if the target Redis\nserver or cluster has been setup to support SSL/TLS.  This requires IO::Socket::SSL\nto be installed on the client.  It's off by default.\n\n=head3 C\u003c\u003c SSL_verify_mode \u003e\u003e\n\nThis parameter will be applied when C\u003c\u003c ssl \u003e\u003e flag is set.  It sets the verification\nmode for the peer certificate.  It's compatible with the parameter with the same name\nin IO::Socket::SSL.\n\n=head3 C\u003c\u003c debug \u003e\u003e\n\nThe C\u003c\u003c debug \u003e\u003e parameter enables debug information to STDERR, including all\ninteractions with the server. You can also enable debug with the C\u003cREDIS_DEBUG\u003e\nenvironment variable.\n\n=head1 CONNECTION HANDLING\n\n=head2 connect\n\n  $r-\u003econnect;\n\nConnects to the Redis server. This is done by default when the obect is\nconstructed using C\u003cnew()\u003e, unless C\u003cno_auto_connect_on_new\u003e has been set. See\nthis option in the C\u003cnew()\u003e constructor.\n\n=head2 quit\n\n  $r-\u003equit;\n\nCloses the connection to the server. The C\u003cquit\u003e method does not support\npipelined operation.\n\n=head2 ping\n\n  $r-\u003eping || die \"no server?\";\n\nThe C\u003cping\u003e method does not support pipelined operation.\n\n=head1 PIPELINE MANAGEMENT\n\n=head2 wait_all_responses\n\nWaits until all pending pipelined responses have been received, and invokes the\npipeline callback for each one.  See L\u003c/PIPELINING\u003e.\n\n=head2 wait_one_response\n\nWaits until the first pending pipelined response has been received, and invokes\nits callback.  See L\u003c/PIPELINING\u003e.\n\n=head1 PUBLISH/SUBSCRIBE COMMANDS\n\nWhen one of L\u003c/subscribe\u003e or L\u003c/psubscribe\u003e is used, the Redis object will\nenter I\u003cPubSub\u003e mode. When in I\u003cPubSub\u003e mode only commands in this section,\nplus L\u003c/quit\u003e, will be accepted.\n\nIf you plan on using PubSub and other Redis functions, you should use two Redis\nobjects, one dedicated to PubSub and the other for regular commands.\n\nAll Pub/Sub commands receive a callback as the last parameter. This callback\nreceives three arguments:\n\n=over\n\n=item *\n\nThe published message.\n\n=item *\n\nThe topic over which the message was sent.\n\n=item *\n\nThe subscribed topic that matched the topic for the message. With L\u003c/subscribe\u003e\nthese last two are the same, always. But with L\u003c/psubscribe\u003e, this parameter\ntells you the pattern that matched.\n\n=back\n\nSee the L\u003cPub-Sub notes|https://redis.io/topics/pubsub\u003e for more information\nabout the messages you will receive on your callbacks after each L\u003c/subscribe\u003e,\nL\u003c/unsubscribe\u003e, L\u003c/psubscribe\u003e and L\u003c/punsubscribe\u003e.\n\n=head2 publish\n\n  $r-\u003epublish($topic, $message);\n\nPublishes the C\u003c\u003c $message \u003e\u003e to the C\u003c\u003c $topic \u003e\u003e.\n\n=head2 subscribe\n\n  $r-\u003esubscribe(\n      @topics_to_subscribe_to,\n      my $savecallback = sub {\n        my ($message, $topic, $subscribed_topic) = @_;\n        ...\n      },\n  );\n\nSubscribe one or more topics. Messages published into one of them will be\nreceived by Redis, and the specified callback will be executed.\n\n=head2 unsubscribe\n\n  $r-\u003eunsubscribe(@topic_list, $savecallback);\n\nStops receiving messages via C\u003c$savecallback\u003e for all the topics in\nC\u003c@topic_list\u003e. B\u003cWARNING:\u003e it is important that you give the same calleback\nthat you used for subscribtion. The value of the CodeRef must be the same, as\nthis is how internally the code identifies it.\n\n=head2 psubscribe\n\n  my @topic_matches = ('prefix1.*', 'prefix2.*');\n  $r-\u003epsubscribe(@topic_matches, my $savecallback = sub { my ($m, $t, $s) = @_; ... });\n\nSubscribes a pattern of topics. All messages to topics that match the pattern\nwill be delivered to the callback.\n\n=head2 punsubscribe\n\n  my @topic_matches = ('prefix1.*', 'prefix2.*');\n  $r-\u003epunsubscribe(@topic_matches, $savecallback);\n\nStops receiving messages via C\u003c$savecallback\u003e for all the topics pattern\nmatches in C\u003c@topic_list\u003e. B\u003cWARNING:\u003e it is important that you give the same\ncalleback that you used for subscribtion. The value of the CodeRef must be the\nsame, as this is how internally the code identifies it.\n\n=head2 is_subscriber\n\n  if ($r-\u003eis_subscriber) { say \"We are in Pub/Sub mode!\" }\n\nReturns true if we are in I\u003cPub/Sub\u003e mode.\n\n=head2 wait_for_messages\n\n  my $keep_going = 1; ## Set to false somewhere to leave the loop\n  my $timeout = 5;\n  $r-\u003ewait_for_messages($timeout) while $keep_going;\n\nBlocks, waits for incoming messages and delivers them to the appropriate\ncallbacks.\n\nRequires a single parameter, the number of seconds to wait for messages. Use 0\nto wait for ever. If a positive non-zero value is used, it will return after\nthat amount of seconds without a single notification.\n\nPlease note that the timeout is not a commitment to return control to the\ncaller at most each C\u003ctimeout\u003e seconds, but more a idle timeout, were control\nwill return to the caller if Redis is idle (as in no messages were received\nduring the timeout period) for more than C\u003ctimeout\u003e seconds.\n\nThe L\u003c/wait_for_messages\u003e call returns the number of messages processed during\nthe run.\n\n=head1 IMPORTANT NOTES ON METHODS\n\n=head2 methods that return multiple values\n\nWhen a method returns more than one value, it checks the context and returns\neither a list of values or an ArrayRef.\n\n=head2 transaction-handling methods\n\nB\u003cWarning:\u003e the behaviour of the TRANSACTIONS commands when combined with\npipelining is still under discussion, and you should B\u003cNOT\u003e use them at the\nsame time just now.\n\nYou can L\u003cfollow the discussion to see the open issues with\nthis|https://github.com/PerlRedis/perl-redis/issues/17\u003e.\n\n=head2 exec\n\n  my @individual_replies = $r-\u003eexec;\n\nC\u003cexec\u003e has special behaviour when run in a pipeline: the C\u003c$reply\u003e argument to\nthe pipeline callback is an array ref whose elements are themselves C\u003c[$reply,\n$error]\u003e pairs.  This means that you can accurately detect errors yielded by\nany command in the transaction, and without any exceptions being thrown.\n\n=head2 keys\n\n  my @keys = $r-\u003ekeys( '*glob_pattern*' );\n  my $keys = $r-\u003ekeys( '*glob_pattern*' ); # count of matching keys\n\nNote that synchronous C\u003ckeys\u003e calls in a scalar context return the number of\nmatching keys (not an array ref of matching keys as you might expect).  This\ndoes not apply in pipelined mode: assuming the server returns a list of keys,\nas expected, it is always passed to the pipeline callback as an array ref.\n\n=head2 hashes\n\nHashes in Redis cannot be nested as in perl, if you want to store a nested\nhash, you need to serialize the hash first. If you want to have a named\nhash, you can use Redis-hashes. You will find an example in the tests\nof this module t/01-basic.t\n\n=head2 eval\n\nNote that this commands sends the Lua script every time you call it. See\nL\u003c/evalsha\u003e and L\u003c/script_load\u003e for an alternative.\n\n=head2 info\n\n  my $info_hash = $r-\u003einfo;\n\nThe C\u003cinfo\u003e method is unique in that it decodes the server's response into a\nhashref, if possible. This decoding happens in both synchronous and pipelined\nmodes.\n\n=head1 KEYS\n\n=head2 del\n\n  $r-\u003edel(key [key ...])\n\nDelete a key (see L\u003chttps://redis.io/commands/del\u003e)\n\n=head2 dump\n\n  $r-\u003edump(key)\n\nReturn a serialized version of the value stored at the specified key. (see L\u003chttps://redis.io/commands/dump\u003e)\n\n=head2 exists\n\n  $r-\u003eexists(key)\n\nDetermine if a key exists (see L\u003chttps://redis.io/commands/exists\u003e)\n\n=head2 expire\n\n  $r-\u003eexpire(key, seconds)\n\nSet a key's time to live in seconds (see L\u003chttps://redis.io/commands/expire\u003e)\n\n=head2 expireat\n\n  $r-\u003eexpireat(key, timestamp)\n\nSet the expiration for a key as a UNIX timestamp (see L\u003chttps://redis.io/commands/expireat\u003e)\n\n=head2 keys\n\n  $r-\u003ekeys(pattern)\n\nFind all keys matching the given pattern (see L\u003chttps://redis.io/commands/keys\u003e)\n\n=head2 migrate\n\n  $r-\u003emigrate(host, port, key, destination-db, timeout, [COPY], [REPLACE])\n\nAtomically transfer a key from a Redis instance to another one. (see L\u003chttps://redis.io/commands/migrate\u003e)\n\n=head2 move\n\n  $r-\u003emove(key, db)\n\nMove a key to another database (see L\u003chttps://redis.io/commands/move\u003e)\n\n=head2 object\n\n  $r-\u003eobject(subcommand, [arguments [arguments ...]])\n\nInspect the internals of Redis objects (see L\u003chttps://redis.io/commands/object\u003e)\n\n=head2 persist\n\n  $r-\u003epersist(key)\n\nRemove the expiration from a key (see L\u003chttps://redis.io/commands/persist\u003e)\n\n=head2 pexpire\n\n  $r-\u003epexpire(key, milliseconds)\n\nSet a key's time to live in milliseconds (see L\u003chttps://redis.io/commands/pexpire\u003e)\n\n=head2 pexpireat\n\n  $r-\u003epexpireat(key, milliseconds-timestamp)\n\nSet the expiration for a key as a UNIX timestamp specified in milliseconds (see L\u003chttps://redis.io/commands/pexpireat\u003e)\n\n=head2 pttl\n\n  $r-\u003epttl(key)\n\nGet the time to live for a key in milliseconds (see L\u003chttps://redis.io/commands/pttl\u003e)\n\n=head2 randomkey\n\n  $r-\u003erandomkey()\n\nReturn a random key from the keyspace (see L\u003chttps://redis.io/commands/randomkey\u003e)\n\n=head2 rename\n\n  $r-\u003erename(key, newkey)\n\nRename a key (see L\u003chttps://redis.io/commands/rename\u003e)\n\n=head2 renamenx\n\n  $r-\u003erenamenx(key, newkey)\n\nRename a key, only if the new key does not exist (see L\u003chttps://redis.io/commands/renamenx\u003e)\n\n=head2 restore\n\n  $r-\u003erestore(key, ttl, serialized-value)\n\nCreate a key using the provided serialized value, previously obtained using DUMP. (see L\u003chttps://redis.io/commands/restore\u003e)\n\n=head2 scan\n\n  $r-\u003escan(cursor, [MATCH pattern], [COUNT count])\n\nIncrementally iterate the keys space (see L\u003chttps://redis.io/commands/scan\u003e)\n\n=head2 sort\n\n  $r-\u003esort(key, [BY pattern], [LIMIT offset count], [GET pattern [GET pattern ...]], [ASC|DESC], [ALPHA], [STORE destination])\n\nSort the elements in a list, set or sorted set (see L\u003chttps://redis.io/commands/sort\u003e)\n\n=head2 ttl\n\n  $r-\u003ettl(key)\n\nGet the time to live for a key (see L\u003chttps://redis.io/commands/ttl\u003e)\n\n=head2 type\n\n  $r-\u003etype(key)\n\nDetermine the type stored at key (see L\u003chttps://redis.io/commands/type\u003e)\n\n=head1 STRINGS\n\n=head2 append\n\n  $r-\u003eappend(key, value)\n\nAppend a value to a key (see L\u003chttps://redis.io/commands/append\u003e)\n\n=head2 bitcount\n\n  $r-\u003ebitcount(key, [start end])\n\nCount set bits in a string (see L\u003chttps://redis.io/commands/bitcount\u003e)\n\n=head2 bitop\n\n  $r-\u003ebitop(operation, destkey, key [key ...])\n\nPerform bitwise operations between strings (see L\u003chttps://redis.io/commands/bitop\u003e)\n\n=head2 bitpos\n\n  $r-\u003ebitpos(key, bit, [start], [end])\n\nFind first bit set or clear in a string (see L\u003chttps://redis.io/commands/bitpos\u003e)\n\n=head2 blpop\n\n  $r-\u003eblpop(key [key ...], timeout)\n\nRemove and get the first element in a list, or block until one is available (see L\u003chttps://redis.io/commands/blpop\u003e)\n\n=head2 brpop\n\n  $r-\u003ebrpop(key [key ...], timeout)\n\nRemove and get the last element in a list, or block until one is available (see L\u003chttps://redis.io/commands/brpop\u003e)\n\n=head2 brpoplpush\n\n  $r-\u003ebrpoplpush(source, destination, timeout)\n\nPop a value from a list, push it to another list and return it; or block until one is available (see L\u003chttps://redis.io/commands/brpoplpush\u003e)\n\n=head2 decr\n\n  $r-\u003edecr(key)\n\nDecrement the integer value of a key by one (see L\u003chttps://redis.io/commands/decr\u003e)\n\n=head2 decrby\n\n  $r-\u003edecrby(key, decrement)\n\nDecrement the integer value of a key by the given number (see L\u003chttps://redis.io/commands/decrby\u003e)\n\n=head2 get\n\n  $r-\u003eget(key)\n\nGet the value of a key (see L\u003chttps://redis.io/commands/get\u003e)\n\n=head2 getbit\n\n  $r-\u003egetbit(key, offset)\n\nReturns the bit value at offset in the string value stored at key (see L\u003chttps://redis.io/commands/getbit\u003e)\n\n=head2 getrange\n\n  $r-\u003egetrange(key, start, end)\n\nGet a substring of the string stored at a key (see L\u003chttps://redis.io/commands/getrange\u003e)\n\n=head2 getset\n\n  $r-\u003egetset(key, value)\n\nSet the string value of a key and return its old value (see L\u003chttps://redis.io/commands/getset\u003e)\n\n=head2 incr\n\n  $r-\u003eincr(key)\n\nIncrement the integer value of a key by one (see L\u003chttps://redis.io/commands/incr\u003e)\n\n=head2 incrby\n\n  $r-\u003eincrby(key, increment)\n\nIncrement the integer value of a key by the given amount (see L\u003chttps://redis.io/commands/incrby\u003e)\n\n=head2 incrbyfloat\n\n  $r-\u003eincrbyfloat(key, increment)\n\nIncrement the float value of a key by the given amount (see L\u003chttps://redis.io/commands/incrbyfloat\u003e)\n\n=head2 mget\n\n  $r-\u003emget(key [key ...])\n\nGet the values of all the given keys (see L\u003chttps://redis.io/commands/mget\u003e)\n\n=head2 mset\n\n  $r-\u003emset(key value [key value ...])\n\nSet multiple keys to multiple values (see L\u003chttps://redis.io/commands/mset\u003e)\n\n=head2 msetnx\n\n  $r-\u003emsetnx(key value [key value ...])\n\nSet multiple keys to multiple values, only if none of the keys exist (see L\u003chttps://redis.io/commands/msetnx\u003e)\n\n=head2 psetex\n\n  $r-\u003epsetex(key, milliseconds, value)\n\nSet the value and expiration in milliseconds of a key (see L\u003chttps://redis.io/commands/psetex\u003e)\n\n=head2 set\n\n  $r-\u003eset(key, value, ['EX',  seconds], ['PX', milliseconds], ['NX'|'XX'])\n\nSet the string value of a key (see L\u003chttps://redis.io/commands/set\u003e). Example:\n\n  $r-\u003eset('key', 'test', 'EX', 60, 'NX')\n\n=head2 setbit\n\n  $r-\u003esetbit(key, offset, value)\n\nSets or clears the bit at offset in the string value stored at key (see L\u003chttps://redis.io/commands/setbit\u003e)\n\n=head2 setex\n\n  $r-\u003esetex(key, seconds, value)\n\nSet the value and expiration of a key (see L\u003chttps://redis.io/commands/setex\u003e)\n\n=head2 setnx\n\n  $r-\u003esetnx(key, value)\n\nSet the value of a key, only if the key does not exist (see L\u003chttps://redis.io/commands/setnx\u003e)\n\n=head2 setrange\n\n  $r-\u003esetrange(key, offset, value)\n\nOverwrite part of a string at key starting at the specified offset (see L\u003chttps://redis.io/commands/setrange\u003e)\n\n=head2 strlen\n\n  $r-\u003estrlen(key)\n\nGet the length of the value stored in a key (see L\u003chttps://redis.io/commands/strlen\u003e)\n\n=head1 HASHES\n\n=head2 hdel\n\n  $r-\u003ehdel(key, field [field ...])\n\nDelete one or more hash fields (see L\u003chttps://redis.io/commands/hdel\u003e)\n\n=head2 hexists\n\n  $r-\u003ehexists(key, field)\n\nDetermine if a hash field exists (see L\u003chttps://redis.io/commands/hexists\u003e)\n\n=head2 hget\n\n  $r-\u003ehget(key, field)\n\nGet the value of a hash field (see L\u003chttps://redis.io/commands/hget\u003e)\n\n=head2 hgetall\n\n  $r-\u003ehgetall(key)\n\nGet all the fields and values in a hash (see L\u003chttps://redis.io/commands/hgetall\u003e)\n\n=head2 hincrby\n\n  $r-\u003ehincrby(key, field, increment)\n\nIncrement the integer value of a hash field by the given number (see L\u003chttps://redis.io/commands/hincrby\u003e)\n\n=head2 hincrbyfloat\n\n  $r-\u003ehincrbyfloat(key, field, increment)\n\nIncrement the float value of a hash field by the given amount (see L\u003chttps://redis.io/commands/hincrbyfloat\u003e)\n\n=head2 hkeys\n\n  $r-\u003ehkeys(key)\n\nGet all the fields in a hash (see L\u003chttps://redis.io/commands/hkeys\u003e)\n\n=head2 hlen\n\n  $r-\u003ehlen(key)\n\nGet the number of fields in a hash (see L\u003chttps://redis.io/commands/hlen\u003e)\n\n=head2 hmget\n\n  $r-\u003ehmget(key, field [field ...])\n\nGet the values of all the given hash fields (see L\u003chttps://redis.io/commands/hmget\u003e)\n\n=head2 hmset\n\n  $r-\u003ehmset(key, field value [field value ...])\n\nSet multiple hash fields to multiple values (see L\u003chttps://redis.io/commands/hmset\u003e)\n\n=head2 hscan\n\n  $r-\u003ehscan(key, cursor, [MATCH pattern], [COUNT count])\n\nIncrementally iterate hash fields and associated values (see L\u003chttps://redis.io/commands/hscan\u003e)\n\n=head2 hset\n\n  $r-\u003ehset(key, field, value)\n\nSet the string value of a hash field (see L\u003chttps://redis.io/commands/hset\u003e)\n\n=head2 hsetnx\n\n  $r-\u003ehsetnx(key, field, value)\n\nSet the value of a hash field, only if the field does not exist (see L\u003chttps://redis.io/commands/hsetnx\u003e)\n\n=head2 hvals\n\n  $r-\u003ehvals(key)\n\nGet all the values in a hash (see L\u003chttps://redis.io/commands/hvals\u003e)\n\n=head1 SETS\n\n=head2 sadd\n\n  $r-\u003esadd(key, member [member ...])\n\nAdd one or more members to a set (see L\u003chttps://redis.io/commands/sadd\u003e)\n\n=head2 scard\n\n  $r-\u003escard(key)\n\nGet the number of members in a set (see L\u003chttps://redis.io/commands/scard\u003e)\n\n=head2 sdiff\n\n  $r-\u003esdiff(key [key ...])\n\nSubtract multiple sets (see L\u003chttps://redis.io/commands/sdiff\u003e)\n\n=head2 sdiffstore\n\n  $r-\u003esdiffstore(destination, key [key ...])\n\nSubtract multiple sets and store the resulting set in a key (see L\u003chttps://redis.io/commands/sdiffstore\u003e)\n\n=head2 sinter\n\n  $r-\u003esinter(key [key ...])\n\nIntersect multiple sets (see L\u003chttps://redis.io/commands/sinter\u003e)\n\n=head2 sinterstore\n\n  $r-\u003esinterstore(destination, key [key ...])\n\nIntersect multiple sets and store the resulting set in a key (see L\u003chttps://redis.io/commands/sinterstore\u003e)\n\n=head2 sismember\n\n  $r-\u003esismember(key, member)\n\nDetermine if a given value is a member of a set (see L\u003chttps://redis.io/commands/sismember\u003e)\n\n=head2 smembers\n\n  $r-\u003esmembers(key)\n\nGet all the members in a set (see L\u003chttps://redis.io/commands/smembers\u003e)\n\n=head2 smove\n\n  $r-\u003esmove(source, destination, member)\n\nMove a member from one set to another (see L\u003chttps://redis.io/commands/smove\u003e)\n\n=head2 spop\n\n  $r-\u003espop(key)\n\nRemove and return a random member from a set (see L\u003chttps://redis.io/commands/spop\u003e)\n\n=head2 srandmember\n\n  $r-\u003esrandmember(key, [count])\n\nGet one or multiple random members from a set (see L\u003chttps://redis.io/commands/srandmember\u003e)\n\n=head2 srem\n\n  $r-\u003esrem(key, member [member ...])\n\nRemove one or more members from a set (see L\u003chttps://redis.io/commands/srem\u003e)\n\n=head2 sscan\n\n  $r-\u003esscan(key, cursor, [MATCH pattern], [COUNT count])\n\nIncrementally iterate Set elements (see L\u003chttps://redis.io/commands/sscan\u003e)\n\n=head2 sunion\n\n  $r-\u003esunion(key [key ...])\n\nAdd multiple sets (see L\u003chttps://redis.io/commands/sunion\u003e)\n\n=head2 sunionstore\n\n  $r-\u003esunionstore(destination, key [key ...])\n\nAdd multiple sets and store the resulting set in a key (see L\u003chttps://redis.io/commands/sunionstore\u003e)\n\n=head1 SORTED SETS\n\n=head2 zadd\n\n  $r-\u003ezadd(key, score member [score member ...])\n\nAdd one or more members to a sorted set, or update its score if it already exists (see L\u003chttps://redis.io/commands/zadd\u003e)\n\n=head2 zcard\n\n  $r-\u003ezcard(key)\n\nGet the number of members in a sorted set (see L\u003chttps://redis.io/commands/zcard\u003e)\n\n=head2 zcount\n\n  $r-\u003ezcount(key, min, max)\n\nCount the members in a sorted set with scores within the given values (see L\u003chttps://redis.io/commands/zcount\u003e)\n\n=head2 zincrby\n\n  $r-\u003ezincrby(key, increment, member)\n\nIncrement the score of a member in a sorted set (see L\u003chttps://redis.io/commands/zincrby\u003e)\n\n=head2 zinterstore\n\n  $r-\u003ezinterstore(destination, numkeys, key [key ...], [WEIGHTS weight [weight ...]], [AGGREGATE SUM|MIN|MAX])\n\nIntersect multiple sorted sets and store the resulting sorted set in a new key (see L\u003chttps://redis.io/commands/zinterstore\u003e)\n\n=head2 zlexcount\n\n  $r-\u003ezlexcount(key, min, max)\n\nCount the number of members in a sorted set between a given lexicographical range (see L\u003chttps://redis.io/commands/zlexcount\u003e)\n\n=head2 zrange\n\n  $r-\u003ezrange(key, start, stop, [WITHSCORES])\n\nReturn a range of members in a sorted set, by index (see L\u003chttps://redis.io/commands/zrange\u003e)\n\n=head2 zrangebylex\n\n  $r-\u003ezrangebylex(key, min, max, [LIMIT offset count])\n\nReturn a range of members in a sorted set, by lexicographical range (see L\u003chttps://redis.io/commands/zrangebylex\u003e)\n\n=head2 zrangebyscore\n\n  $r-\u003ezrangebyscore(key, min, max, [WITHSCORES], [LIMIT offset count])\n\nReturn a range of members in a sorted set, by score (see L\u003chttps://redis.io/commands/zrangebyscore\u003e)\n\n=head2 zrank\n\n  $r-\u003ezrank(key, member)\n\nDetermine the index of a member in a sorted set (see L\u003chttps://redis.io/commands/zrank\u003e)\n\n=head2 zrem\n\n  $r-\u003ezrem(key, member [member ...])\n\nRemove one or more members from a sorted set (see L\u003chttps://redis.io/commands/zrem\u003e)\n\n=head2 zremrangebylex\n\n  $r-\u003ezremrangebylex(key, min, max)\n\nRemove all members in a sorted set between the given lexicographical range (see L\u003chttps://redis.io/commands/zremrangebylex\u003e)\n\n=head2 zremrangebyrank\n\n  $r-\u003ezremrangebyrank(key, start, stop)\n\nRemove all members in a sorted set within the given indexes (see L\u003chttps://redis.io/commands/zremrangebyrank\u003e)\n\n=head2 zremrangebyscore\n\n  $r-\u003ezremrangebyscore(key, min, max)\n\nRemove all members in a sorted set within the given scores (see L\u003chttps://redis.io/commands/zremrangebyscore\u003e)\n\n=head2 zrevrange\n\n  $r-\u003ezrevrange(key, start, stop, [WITHSCORES])\n\nReturn a range of members in a sorted set, by index, with scores ordered from high to low (see L\u003chttps://redis.io/commands/zrevrange\u003e)\n\n=head2 zrevrangebylex\n\n  $r-\u003ezrevrangebylex(key, max, min, [LIMIT offset count])\n\nReturn a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings. (see L\u003chttps://redis.io/commands/zrevrangebylex\u003e)\n\n=head2 zrevrangebyscore\n\n  $r-\u003ezrevrangebyscore(key, max, min, [WITHSCORES], [LIMIT offset count])\n\nReturn a range of members in a sorted set, by score, with scores ordered from high to low (see L\u003chttps://redis.io/commands/zrevrangebyscore\u003e)\n\n=head2 zrevrank\n\n  $r-\u003ezrevrank(key, member)\n\nDetermine the index of a member in a sorted set, with scores ordered from high to low (see L\u003chttps://redis.io/commands/zrevrank\u003e)\n\n=head2 zscan\n\n  $r-\u003ezscan(key, cursor, [MATCH pattern], [COUNT count])\n\nIncrementally iterate sorted sets elements and associated scores (see L\u003chttps://redis.io/commands/zscan\u003e)\n\n=head2 zscore\n\n  $r-\u003ezscore(key, member)\n\nGet the score associated with the given member in a sorted set (see L\u003chttps://redis.io/commands/zscore\u003e)\n\n=head2 zunionstore\n\n  $r-\u003ezunionstore(destination, numkeys, key [key ...], [WEIGHTS weight [weight ...]], [AGGREGATE SUM|MIN|MAX])\n\nAdd multiple sorted sets and store the resulting sorted set in a new key (see L\u003chttps://redis.io/commands/zunionstore\u003e)\n\n=head1 HYPERLOGLOG\n\n=head2 pfadd\n\n  $r-\u003epfadd(key, element [element ...])\n\nAdds the specified elements to the specified HyperLogLog. (see L\u003chttps://redis.io/commands/pfadd\u003e)\n\n=head2 pfcount\n\n  $r-\u003epfcount(key [key ...])\n\nReturn the approximated cardinality of the set(s) observed by the HyperLogLog at key(s). (see L\u003chttps://redis.io/commands/pfcount\u003e)\n\n=head2 pfmerge\n\n  $r-\u003epfmerge(destkey, sourcekey [sourcekey ...])\n\nMerge N different HyperLogLogs into a single one. (see L\u003chttps://redis.io/commands/pfmerge\u003e)\n\n=head1 PUB/SUB\n\n=head2 pubsub\n\n  $r-\u003epubsub(subcommand, [argument [argument ...]])\n\nInspect the state of the Pub/Sub subsystem (see L\u003chttps://redis.io/commands/pubsub\u003e)\n\n=head1 TRANSACTIONS\n\n=head2 discard\n\n  $r-\u003ediscard()\n\nDiscard all commands issued after MULTI (see L\u003chttps://redis.io/commands/discard\u003e)\n\n=head2 exec\n\n  $r-\u003eexec()\n\nExecute all commands issued after MULTI (see L\u003chttps://redis.io/commands/exec\u003e)\n\n=head2 multi\n\n  $r-\u003emulti()\n\nMark the start of a transaction block (see L\u003chttps://redis.io/commands/multi\u003e)\n\n=head2 unwatch\n\n  $r-\u003eunwatch()\n\nForget about all watched keys (see L\u003chttps://redis.io/commands/unwatch\u003e)\n\n=head2 watch\n\n  $r-\u003ewatch(key [key ...])\n\nWatch the given keys to determine execution of the MULTI/EXEC block (see L\u003chttps://redis.io/commands/watch\u003e)\n\n=head1 SCRIPTING\n\n=head2 eval\n\n  $r-\u003eeval(script, numkeys, key [key ...], arg [arg ...])\n\nExecute a Lua script server side (see L\u003chttps://redis.io/commands/eval\u003e)\n\n=head2 evalsha\n\n  $r-\u003eevalsha(sha1, numkeys, key [key ...], arg [arg ...])\n\nExecute a Lua script server side (see L\u003chttps://redis.io/commands/evalsha\u003e)\n\n=head2 script_exists\n\n  $r-\u003escript_exists(script [script ...])\n\nCheck existence of scripts in the script cache. (see L\u003chttps://redis.io/commands/script-exists\u003e)\n\n=head2 script_flush\n\n  $r-\u003escript_flush()\n\nRemove all the scripts from the script cache. (see L\u003chttps://redis.io/commands/script-flush\u003e)\n\n=head2 script_kill\n\n  $r-\u003escript_kill()\n\nKill the script currently in execution. (see L\u003chttps://redis.io/commands/script-kill\u003e)\n\n=head2 script_load\n\n  $r-\u003escript_load(script)\n\nLoad the specified Lua script into the script cache. (see L\u003chttps://redis.io/commands/script-load\u003e)\n\n=head1 CONNECTION\n\n=head2 auth\n\n  $r-\u003eauth(password)\n\nAuthenticate to the server (see L\u003chttps://redis.io/commands/auth\u003e)\n\n  $r-\u003eauth(username, password)\n\nAuthenticate to the server using Redis 6.0+ ACL System (see L\u003chttps://redis.io/commands/auth\u003e)\n\n=head2 echo\n\n  $r-\u003eecho(message)\n\nEcho the given string (see L\u003chttps://redis.io/commands/echo\u003e)\n\n=head2 ping\n\n  $r-\u003eping()\n\nPing the server (see L\u003chttps://redis.io/commands/ping\u003e)\n\n=head2 quit\n\n  $r-\u003equit()\n\nClose the connection (see L\u003chttps://redis.io/commands/quit\u003e)\n\n=head2 select\n\n  $r-\u003eselect(index)\n\nChange the selected database for the current connection (see L\u003chttps://redis.io/commands/select\u003e)\n\n=head1 SERVER\n\n=head2 bgrewriteaof\n\n  $r-\u003ebgrewriteaof()\n\nAsynchronously rewrite the append-only file (see L\u003chttps://redis.io/commands/bgrewriteaof\u003e)\n\n=head2 bgsave\n\n  $r-\u003ebgsave()\n\nAsynchronously save the dataset to disk (see L\u003chttps://redis.io/commands/bgsave\u003e)\n\n=head2 client_getname\n\n  $r-\u003eclient_getname()\n\nGet the current connection name (see L\u003chttps://redis.io/commands/client-getname\u003e)\n\n=head2 client_kill\n\n  $r-\u003eclient_kill([ip:port], [ID client-id], [TYPE normal|slave|pubsub], [ADDR ip:port], [SKIPME yes/no])\n\nKill the connection of a client (see L\u003chttps://redis.io/commands/client-kill\u003e)\n\n=head2 client_list\n\n  $r-\u003eclient_list()\n\nGet the list of client connections (see L\u003chttps://redis.io/commands/client-list\u003e)\n\n=head2 client_pause\n\n  $r-\u003eclient_pause(timeout)\n\nStop processing commands from clients for some time (see L\u003chttps://redis.io/commands/client-pause\u003e)\n\n=head2 client_setname\n\n  $r-\u003eclient_setname(connection-name)\n\nSet the current connection name (see L\u003chttps://redis.io/commands/client-setname\u003e)\n\n=head2 cluster_slots\n\n  $r-\u003ecluster_slots()\n\nGet array of Cluster slot to node mappings (see L\u003chttps://redis.io/commands/cluster-slots\u003e)\n\n=head2 command\n\n  $r-\u003ecommand()\n\nGet array of Redis command details (see L\u003chttps://redis.io/commands/command\u003e)\n\n=head2 command_count\n\n  $r-\u003ecommand_count()\n\nGet total number of Redis commands (see L\u003chttps://redis.io/commands/command-count\u003e)\n\n=head2 command_getkeys\n\n  $r-\u003ecommand_getkeys()\n\nExtract keys given a full Redis command (see L\u003chttps://redis.io/commands/command-getkeys\u003e)\n\n=head2 command_info\n\n  $r-\u003ecommand_info(command-name [command-name ...])\n\nGet array of specific Redis command details (see L\u003chttps://redis.io/commands/command-info\u003e)\n\n=head2 config_get\n\n  $r-\u003econfig_get(parameter)\n\nGet the value of a configuration parameter (see L\u003chttps://redis.io/commands/config-get\u003e)\n\n=head2 config_resetstat\n\n  $r-\u003econfig_resetstat()\n\nReset the stats returned by INFO (see L\u003chttps://redis.io/commands/config-resetstat\u003e)\n\n=head2 config_rewrite\n\n  $r-\u003econfig_rewrite()\n\nRewrite the configuration file with the in memory configuration (see L\u003chttps://redis.io/commands/config-rewrite\u003e)\n\n=head2 config_set\n\n  $r-\u003econfig_set(parameter, value)\n\nSet a configuration parameter to the given value (see L\u003chttps://redis.io/commands/config-set\u003e)\n\n=head2 dbsize\n\n  $r-\u003edbsize()\n\nReturn the number of keys in the selected database (see L\u003chttps://redis.io/commands/dbsize\u003e)\n\n=head2 debug_object\n\n  $r-\u003edebug_object(key)\n\nGet debugging information about a key (see L\u003chttps://redis.io/commands/debug-object\u003e)\n\n=head2 debug_segfault\n\n  $r-\u003edebug_segfault()\n\nMake the server crash (see L\u003chttps://redis.io/commands/debug-segfault\u003e)\n\n=head2 flushall\n\n  $r-\u003eflushall()\n\nRemove all keys from all databases (see L\u003chttps://redis.io/commands/flushall\u003e)\n\n=head2 flushdb\n\n  $r-\u003eflushdb()\n\nRemove all keys from the current database (see L\u003chttps://redis.io/commands/flushdb\u003e)\n\n=head2 info\n\n  $r-\u003einfo([section])\n\nGet information and statistics about the server (see L\u003chttps://redis.io/commands/info\u003e)\n\n=head2 lastsave\n\n  $r-\u003elastsave()\n\nGet the UNIX time stamp of the last successful save to disk (see L\u003chttps://redis.io/commands/lastsave\u003e)\n\n=head2 lindex\n\n  $r-\u003elindex(key, index)\n\nGet an element from a list by its index (see L\u003chttps://redis.io/commands/lindex\u003e)\n\n=head2 linsert\n\n  $r-\u003elinsert(key, BEFORE|AFTER, pivot, value)\n\nInsert an element before or after another element in a list (see L\u003chttps://redis.io/commands/linsert\u003e)\n\n=head2 llen\n\n  $r-\u003ellen(key)\n\nGet the length of a list (see L\u003chttps://redis.io/commands/llen\u003e)\n\n=head2 lpop\n\n  $r-\u003elpop(key)\n\nRemove and get the first element in a list (see L\u003chttps://redis.io/commands/lpop\u003e)\n\n=head2 lpush\n\n  $r-\u003elpush(key, value [value ...])\n\nPrepend one or multiple values to a list (see L\u003chttps://redis.io/commands/lpush\u003e)\n\n=head2 lpushx\n\n  $r-\u003elpushx(key, value)\n\nPrepend a value to a list, only if the list exists (see L\u003chttps://redis.io/commands/lpushx\u003e)\n\n=head2 lrange\n\n  $r-\u003elrange(key, start, stop)\n\nGet a range of elements from a list (see L\u003chttps://redis.io/commands/lrange\u003e)\n\n=head2 lrem\n\n  $r-\u003elrem(key, count, value)\n\nRemove elements from a list (see L\u003chttps://redis.io/commands/lrem\u003e)\n\n=head2 lset\n\n  $r-\u003elset(key, index, value)\n\nSet the value of an element in a list by its index (see L\u003chttps://redis.io/commands/lset\u003e)\n\n=head2 ltrim\n\n  $r-\u003eltrim(key, start, stop)\n\nTrim a list to the specified range (see L\u003chttps://redis.io/commands/ltrim\u003e)\n\n=head2 monitor\n\n  $r-\u003emonitor()\n\nListen for all requests received by the server in real time (see L\u003chttps://redis.io/commands/monitor\u003e)\n\n=head2 role\n\n  $r-\u003erole()\n\nReturn the role of the instance in the context of replication (see L\u003chttps://redis.io/commands/role\u003e)\n\n=head2 rpop\n\n  $r-\u003erpop(key)\n\nRemove and get the last element in a list (see L\u003chttps://redis.io/commands/rpop\u003e)\n\n=head2 rpoplpush\n\n  $r-\u003erpoplpush(source, destination)\n\nRemove the last element in a list, append it to another list and return it (see L\u003chttps://redis.io/commands/rpoplpush\u003e)\n\n=head2 rpush\n\n  $r-\u003erpush(key, value [value ...])\n\nAppend one or multiple values to a list (see L\u003chttps://redis.io/commands/rpush\u003e)\n\n=head2 rpushx\n\n  $r-\u003erpushx(key, value)\n\nAppend a value to a list, only if the list exists (see L\u003chttps://redis.io/commands/rpushx\u003e)\n\n=head2 save\n\n  $r-\u003esave()\n\nSynchronously save the dataset to disk (see L\u003chttps://redis.io/commands/save\u003e)\n\n=head2 shutdown\n\n  $r-\u003eshutdown([NOSAVE], [SAVE])\n\nSynchronously save the dataset to disk and then shut down the server (see L\u003chttps://redis.io/commands/shutdown\u003e)\n\n=head2 slaveof\n\n  $r-\u003eslaveof(host, port)\n\nMake the server a slave of another instance, or promote it as master (see L\u003chttps://redis.io/commands/slaveof\u003e)\n\n=head2 slowlog\n\n  $r-\u003eslowlog(subcommand, [argument])\n\nManages the Redis slow queries log (see L\u003chttps://redis.io/commands/slowlog\u003e)\n\n=head2 sync\n\n  $r-\u003esync()\n\nInternal command used for replication (see L\u003chttps://redis.io/commands/sync\u003e)\n\n=head2 time\n\n  $r-\u003etime()\n\nReturn the current server time (see L\u003chttps://redis.io/commands/time\u003e)\n\n=head1 ACKNOWLEDGEMENTS\n\nThe following persons contributed to this project (random order):\n\n=over\n\n=item *\n\nAaron Crane (pipelining and AUTOLOAD caching support)\n\n=item *\n\nDirk Vleugels\n\n=item *\n\nFlavio Poletti\n\n=item *\n\nJeremy Zawodny\n\n=item *\n\nsunnavy at bestpractical.com\n\n=item *\n\nThiago Berlitz Rondon\n\n=item *\n\nUlrich Habel\n\n=item *\n\nIvan Kruglov\n\n=item *\n\nSteffen Mueller \u003csmueller@cpan.org\u003e\n\n=back\n\n=head1 AUTHORS\n\n=over 4\n\n=item *\n\nPedro Melo \u003cmelo@cpan.org\u003e\n\n=item *\n\nDamien Krotkine \u003cdams@cpan.org\u003e\n\n=back\n\n=head1 COPYRIGHT AND LICENSE\n\nThis software is Copyright (c) 2015 by Pedro Melo, Damien Krotkine.\n\nThis is free software, licensed under:\n\n  The Artistic License 2.0 (GPL Compatible)\n\n\n=cut\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerlRedis%2Fperl-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPerlRedis%2Fperl-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerlRedis%2Fperl-redis/lists"}