浏览代码

清空redis

lizhen_gitee 3 年之前
父节点
当前提交
8b737e13ae
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      application/index/controller/Index.php

+ 8 - 1
application/index/controller/Index.php

@@ -11,10 +11,17 @@ class Index extends Frontend
     protected $noNeedRight = '*';
     protected $layout = '';
 
-    public function testredis(){
+    public function showredis(){
         $list = Db::name('user')->column('id');
         foreach($list as $key => $id){
             dump($id.':'.redis_matching_get($id));
+        }
+        exit;
+    }
+
+    public function clearredis(){
+        $list = Db::name('user')->column('id');
+        foreach($list as $key => $id){
             $a = redis_matching_set($id,0);
         }
         exit;