|
|
@@ -40,9 +40,13 @@ class TestController extends BaseController
|
|
|
|
|
|
public function actionOn()
|
|
|
{
|
|
|
+ echo "<pre>";
|
|
|
$cacheKey = 'test';
|
|
|
Yii::$app->redis->executeCommand('HSET', [$cacheKey, 'shish', 1]);
|
|
|
- echo Yii::$app->redis->executeCommand('HGET', [$cacheKey,'shish']);
|
|
|
+ echo Yii::$app->redis->executeCommand('HGET', [$cacheKey, 'shish']);
|
|
|
+
|
|
|
+ $return = Yii::$app->redis->executeCommand('HEXISTS', [$cacheKey, 'shish']);
|
|
|
+ var_dump($return);
|
|
|
|
|
|
Yii::$app->redis->executeCommand('HSET', [$cacheKey, 'sofashi', 2]);
|
|
|
|
|
|
@@ -50,6 +54,11 @@ class TestController extends BaseController
|
|
|
|
|
|
$arr = Yii::$app->redis->executeCommand('HKEYS', [$cacheKey]);
|
|
|
print_r($arr);
|
|
|
+
|
|
|
+ Yii::$app->redis->executeCommand('HDEL', [$cacheKey, 'lgl']);
|
|
|
+
|
|
|
+ $arr = Yii::$app->redis->executeCommand('HKEYS', [$cacheKey]);
|
|
|
+ print_r($arr);
|
|
|
}
|
|
|
|
|
|
public function actionIn()
|