Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf9f609e

Browse files
joshtrichardsmichael-grunder
authored andcommitted
Refine parameter descriptions and examples in README
1 parent1d07c3a commitf9f609e

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

‎README.md‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ $redis = new Redis();
177177
~~~
178178

179179
Starting from version 6.0.0 it's possible to specify configuration options.
180-
This allows to connect lazily to the server without explicitly invoking`connect`command.
180+
This allows to connect lazily to the server without explicitly invoking`connect`/`pconnect`.
181181

182182
#####*Example*
183183

@@ -197,10 +197,10 @@ $redis = new Redis([
197197
]);
198198
~~~
199199

200-
#####*Parameters*
200+
#####*Parameters* (optional)
201201

202-
*host*: string. can be a host,or the path to a unix domain socket.
203-
*port*: int (default is6379, should be -1for unix domain socket)
202+
*host*: string, the hostname/FQDN/IP addressor the path to a unix domain socket; since v5.0.0 it is possible to specify schema
203+
*port*: int, actual port (e.g.`6379`) or`-1` (or`0`)for unix domain socket; setting to <`0` with non-UDS will assume default of`6379`
204204
*connectTimeout*: float, value in seconds (default is 0 meaning unlimited)
205205
*retryInterval*: int, value in milliseconds (optional)
206206
*readTimeout*: float, value in seconds (default is 0 meaning unlimited)
@@ -250,11 +250,11 @@ _**Description**_: Connects to a Redis instance.
250250

251251
#####*Parameters*
252252

253-
*host*: string. can be a host,or the path to a unix domain socket. Starting from version 5.0.0 it is possible to specify schema
254-
*port*: int, optional
253+
*host*: string,*host*: string, the hostname/FQDN/IP addressor the path to a unix domain socket; since v5.0.0 it is possible to specify schema
254+
*port*: int,actual port (e.g.`6379`) or`-1` (or`0`) for unix domain socket; setting to <`0` with non-UDS will assume default of`6379`,optional
255255
*timeout*: float, value in seconds (optional, default is 0 meaning it will use default_socket_timeout)
256256
*reserved*: should be '' if retry_interval is specified
257-
*retry_interval*: int, value in milliseconds (optional)
257+
*retry_interval*: int, value in milliseconds,optional
258258
*read_timeout*: float, value in seconds (optional, default is 0 meaning it will use default_socket_timeout)
259259
*others*: array, with PhpRedis >= 5.3.0, it allows setting_auth_ and[_stream_](https://www.php.net/manual/en/context.ssl.php) configuration.
260260

@@ -291,15 +291,15 @@ connections on many servers connecting to one redis server.
291291
Also more than one persistent connection can be made identified by either host + port + timeout
292292
or host + persistent_id or unix socket + timeout.
293293

294-
Starting from version 4.2.1, it became possible to use connection pooling by setting INI variable`redis.pconnect.pooling_enabled` to 1.
294+
Since v4.2.1, it became possible to use connection pooling by setting INI variable`redis.pconnect.pooling_enabled` to 1.
295295

296296
This feature is not available in threaded versions.`pconnect` and`popen` then working like their non
297297
persistent equivalents.
298298

299299
#####*Parameters*
300300

301-
*host*: string. can be a host,or the path to a unix domain socket. Starting from version 5.0.0 it is possible to specify schema
302-
*port*: int, optional
301+
*host*: string,*host*: string, the hostname/FQDN/IP addressor the path to a unix domain socket; since v5.0.0 it is possible to specify schema
302+
*port*: int,actual port (e.g.`6379`) or`-1` (or`0`) for unix domain socket; setting to <`0` with non-UDS will assume default of`6379`,optional
303303
*timeout*: float, value in seconds (optional, default is 0 meaning it will use default_socket_timeout)
304304
*persistent_id*: string. identity for the requested persistent connection
305305
*retry_interval*: int, value in milliseconds (optional)
@@ -812,7 +812,7 @@ $redis->slowLog('len');
812812
*[exists](#exists) - Determine if a key exists
813813
*[expire, pexpire](#expire-pexpire) - Set a key's time to live in seconds
814814
*[expireAt, pexpireAt](#expireat-pexpireat) - Set the expiration for a key as a UNIX timestamp
815-
*[keys](#keys) - Find all keys matching the given pattern
815+
*[keys](#keys-1) - Find all keys matching the given pattern
816816
*[scan](#scan) - Scan for keys in the keyspace (Redis >= 2.8.0)
817817
*[migrate](#migrate) - Atomically transfer a key from a Redis instance to another one
818818
*[move](#move) - Move a key to another database
@@ -836,7 +836,7 @@ _**Description**_: Get the value related to the specified key
836836
*key*
837837

838838
#####*Return value*
839-
*String* or*Bool*: If keydidn't exist,`FALSE` is returned. Otherwise, the value related to this key is returned.
839+
*String* or*Bool*: If keydoesn't exist,`FALSE` is returned. Otherwise, the value related to this key is returned.
840840

841841
#####*Examples*
842842

@@ -858,7 +858,7 @@ _**Description**_: Get the value related to the specified key and set its expira
858858
*`PERSIST` - remove the expiration from the key
859859

860860
#####*Return value*
861-
*String* or*Bool*: If keydidn't exist,`FALSE` is returned. Otherwise, the value related to this key is returned.
861+
*String* or*Bool*: If keydoesn't exist,`FALSE` is returned. Otherwise, the value related to this key is returned.
862862

863863
#####*Examples*
864864

@@ -873,7 +873,7 @@ _**Description**_: Set the string value in argument as value of the key. If you
873873
#####*Parameters*
874874
*Key*
875875
*Value*
876-
*Timeout or Options Array* (optional). If you pass an integer, phpredis will redirect to SETEX, and will try to use Redis >= 2.6.12 extended options if you pass an array with valid values
876+
*Timeout or Options Array* (optional). If you pass an integer, phpredis will redirect to SETEX, and will try to use Redis >= 2.6.12 extended options if you pass an array with valid values
877877

878878
#####*Return value*
879879
*Bool*`TRUE` if the command is successful.
@@ -899,12 +899,12 @@ $redis->set('key', 'value', ['xx', 'px'=>1000]);
899899
_**Description**_: Set the string value in argument as value of the key, with a time to live. PSETEX uses a TTL in milliseconds.
900900

901901
#####*Parameters*
902-
*Key*
903-
*TTL*
904-
*Value*
902+
*Key*
903+
*TTL*
904+
*Value*
905905

906906
#####*Return value*
907-
*Bool*`TRUE` if the command is successful.
907+
*Bool*`TRUE` if the command is successful,`FALSE` in case of failure.
908908

909909
#####*Examples*
910910

@@ -918,11 +918,11 @@ $redis->pSetEx('key', 100, 'value'); // sets key → value, with 0.1 sec TTL.
918918
_**Description**_: Set the string value in argument as value of the key if the key doesn't already exist in the database.
919919

920920
#####*Parameters*
921-
*key*
922-
*value*
921+
*Key*
922+
*Value*
923923

924924
#####*Return value*
925-
*Bool*`TRUE`in case of success,`FALSE` in case of failure.
925+
*Bool*`TRUE`if the command is successful,`FALSE` in case of failure.
926926

927927
#####*Examples*
928928
~~~php
@@ -940,7 +940,7 @@ An array of keys, or an undefined number of parameters, each a key: *key1* *key2
940940
*Note*: If you are connecting to Redis server >= 4.0.0 you can remove a key with the`unlink` method in the exact same way you would use`del`. The Redis[unlink](https://redis.io/commands/unlink) command is non-blocking and will perform the actual deletion asynchronously.
941941

942942
#####*Return value*
943-
*Long* Number of keys deleted.
943+
*Long* Number of keys deleted (`0` if none existed to start with),`FALSE` in case of unexpected failure (i.e. connection, etc.)
944944

945945
#####*Examples*
946946
~~~php
@@ -967,7 +967,7 @@ _**Description**_: Verify if the specified key exists.
967967
*key*
968968

969969
#####*Return value*
970-
*long*: The numberof keys tested thatdo exist.
970+
*Long* Numberof keys tested thatexist (`0` if none do),`FALSE` in case of failure.
971971

972972
#####*Examples*
973973
~~~php
@@ -980,7 +980,7 @@ $redis->exists(['foo', 'bar', 'baz']); /* 3 */
980980
$redis->exists('foo', 'bar', 'baz'); /* 3 */
981981
~~~
982982

983-
**Note**: This function took a single argument and returned TRUE or FALSEin phpredis versions < 4.0.0.
983+
**Note**: This function took a single argument and returned TRUE or FALSE<v4.0.0.
984984

985985
###incr, incrBy
986986
-----

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp