Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9a6ce2 commit 26cf871Copy full SHA for 26cf871
README.markdown
@@ -1383,6 +1383,7 @@ None.
1383
<pre>
1384
$redis->bgSave();
1385
</pre>
1386
+
1387
## lastSave
1388
1389
##### *Description*
@@ -1622,6 +1623,30 @@ None.
1622
1623
$redis->info();
1624
1625
1626
+## resetStat
1627
+##### *Description*
1628
+Resets the statistics reported by Redis using the INFO command (`info()` function).
1629
1630
+These are the counters that are reset:
1631
1632
+* Keyspace hits
1633
+* Keyspace misses
1634
+* Number of commands processed
1635
+* Number of connections received
1636
+* Number of expired keys
1637
1638
1639
+##### *Parameters*
1640
+None.
1641
1642
+##### *Return value*
1643
+*BOOL*: `TRUE` in case of success, `FALSE` in case of failure.
1644
1645
+##### *Example*
1646
+<pre>
1647
+$redis->resetStat();
1648
+</pre>
1649
1650
## ttl
1651
1652
Returns the time to live left for a given key, in seconds. If the key doesn't exist, `FALSE` is returned.
php_redis.h
@@ -96,6 +96,7 @@ PHP_METHOD(Redis, auth);
96
PHP_METHOD(Redis, ttl);
97
PHP_METHOD(Redis, persist);
98
PHP_METHOD(Redis, info);
99
+PHP_METHOD(Redis, resetStat);
100
PHP_METHOD(Redis, select);
101
PHP_METHOD(Redis, move);
102
PHP_METHOD(Redis, zAdd);
redis.c
@@ -124,6 +124,7 @@ static zend_function_entry redis_functions[] = {
124
PHP_ME(Redis, ttl, NULL, ZEND_ACC_PUBLIC)
125
PHP_ME(Redis, persist, NULL, ZEND_ACC_PUBLIC)
126
PHP_ME(Redis, info, NULL, ZEND_ACC_PUBLIC)
127
+ PHP_ME(Redis, resetStat, NULL, ZEND_ACC_PUBLIC)
128
PHP_ME(Redis, select, NULL, ZEND_ACC_PUBLIC)
129
PHP_ME(Redis, move, NULL, ZEND_ACC_PUBLIC)
130
PHP_ME(Redis, bgrewriteaof, NULL, ZEND_ACC_PUBLIC)
@@ -2931,6 +2932,16 @@ PHP_METHOD(Redis, info) {
2931
2932
}
2933
/* }}} */
2934
2935
+/* {{{ proto string Redis::resetStat()
2936
+ */
2937
+PHP_METHOD(Redis, resetStat)
2938
+{
2939
+ char *cmd;
2940
+ int cmd_len = redis_cmd_format_static(&cmd, "CONFIG", "s", "RESETSTAT", 9);
2941
+ generic_empty_cmd(INTERNAL_FUNCTION_PARAM_PASSTHRU, cmd, cmd_len);
2942
+}
2943
+/* }}} */
2944
2945
/* {{{ proto bool Redis::select(long dbNumber)
2946
*/
2947
PHP_METHOD(Redis, select) {
0 commit comments