mirror of
https://github.com/predis/predis.git
synced 2026-08-30 12:15:03 +00:00
Added support for new container command approach of NO-EVICT subcommand (#1346)
This commit is contained in:
committed by
GitHub
parent
e60030770e
commit
a5cc48d85f
@@ -7,6 +7,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- v2.**
|
||||
- v3.**
|
||||
pull_request: null
|
||||
|
||||
permissions: {}
|
||||
|
||||
@@ -5,6 +5,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- v2.**
|
||||
- v3.**
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -5,6 +5,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- v2.**
|
||||
- v3.**
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user