Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b995072

Browse files
Fix documentation for resetStat
There is no `resetStat` command, but there is `CONFIG RESETSTAT`. Fixes #928
1 parent 72b37fa commit b995072

1 file changed

Lines changed: 6 additions & 30 deletions

File tree

README.markdown

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ $redis->setOption(Redis::OPT_BACKOFF_CAP, 750); // backoff time capped at 750ms
501501
1. [flushDb](#flushdb) - Remove all keys from the current database
502502
1. [info](#info) - Get information and statistics about the server
503503
1. [lastSave](#lastsave) - Get the timestamp of the last disk save
504-
1. [resetStat](#resetstat) - Reset the stats returned by [info](#info) method.
505504
1. [save](#save) - Synchronously save the dataset to disk (wait to complete)
506505
1. [slaveOf](#slaveof) - Make the server a slave of another instance, or promote it to master
507506
1. [time](#time) - Return the current server time
@@ -558,19 +557,20 @@ $redis->bgSave();
558557
-----
559558
_**Description**_: Get or Set the Redis server configuration parameters.
560559

561-
##### *Parameters*
562-
*operation* (string) either `GET` or `SET`
563-
*key* string for `SET`, glob-pattern for `GET`. See http://redis.io/commands/config-get for examples.
564-
*value* optional string (only for `SET`)
560+
##### *Prototype*
561+
~~~php
562+
$redis->config($operation, ?string $key = NULL, ?string $value = NULL): mixed;
563+
~~~
565564

566565
##### *Return value*
567566
*Associative array* for `GET`, key -> value
568-
*bool* for `SET`
567+
*bool* for `SET`, and `RESETSTAT`
569568

570569
##### *Examples*
571570
~~~php
572571
$redis->config("GET", "*max-*-entries*");
573572
$redis->config("SET", "dir", "/var/run/redis/dumps/");
573+
$redis->config('RESETSTAT');
574574
~~~
575575

576576
### dbSize
@@ -668,30 +668,6 @@ None.
668668
$redis->lastSave();
669669
~~~
670670

671-
### resetStat
672-
-----
673-
_**Description**_: Reset the stats returned by [info](#info) method.
674-
675-
These are the counters that are reset:
676-
677-
* Keyspace hits
678-
* Keyspace misses
679-
* Number of commands processed
680-
* Number of connections received
681-
* Number of expired keys
682-
683-
684-
##### *Parameters*
685-
None.
686-
687-
##### *Return value*
688-
*BOOL*: `TRUE` in case of success, `FALSE` in case of failure.
689-
690-
##### *Example*
691-
~~~php
692-
$redis->resetStat();
693-
~~~
694-
695671
### save
696672
-----
697673
_**Description**_: Synchronously save the dataset to disk (wait to complete)

0 commit comments

Comments
 (0)