Added support for new container command approach of NO-EVICT subcommand (#1346)

This commit is contained in:
Vladyslav Vildanov
2023-07-26 16:33:20 +03:00
committed by GitHub
parent e60030770e
commit a5cc48d85f
6 changed files with 19 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ on:
branches:
- main
- v2.**
- v3.**
pull_request: null
permissions: {}
+1
View File
@@ -5,6 +5,7 @@ on:
branches:
- main
- v2.**
- v3.**
pull_request:
jobs:
+1
View File
@@ -5,6 +5,7 @@ on:
branches:
- main
- v2.**
- v3.**
pull_request:
concurrency:
+1
View File
@@ -18,6 +18,7 @@ use Predis\Response\Status;
* @method string getName()
* @method Status kill(...$arguments)
* @method string list(string $type = null, int ...$clientId)
* @method Status noEvict(bool $enable = null)
* @method Status noTouch(bool $enable = null)
* @method Status setInfo(string $modifier = null, string $value = null)
* @method Status setName(string $connectionName)
+4
View File
@@ -36,6 +36,10 @@ class CLIENT extends RedisCommand
case 'LIST':
$this->setListArguments($arguments);
break;
case 'NOEVICT':
$arguments[0] = 'NO-EVICT';
$this->setNoTouchArguments($arguments);
break;
case 'NOTOUCH':
$arguments[0] = 'NO-TOUCH';
$this->setNoTouchArguments($arguments);
@@ -229,6 +229,17 @@ BUFFER;
$this->assertEquals($expectedConnectionName, $redis->client->getName());
}
/**
* @group connected
* @requiresRedisVersion >= 7.0.0
*/
public function testNoEvictTurnEnableEvictionMode(): void
{
$redis = $this->getClient();
$this->assertEquals('OK', $redis->client->noEvict(true));
}
/**
* @group connected
* @requiresRedisVersion >= 7.2.0