dever 6 سال پیش
والد
کامیت
4796906fff
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      main/src/Content.php

+ 5 - 1
main/src/Content.php

@@ -142,17 +142,21 @@ class Content extends Core
         # 测试缓存
         # 测试缓存
         $redis = new \Redis;
         $redis = new \Redis;
 
 
-        $redis->connect('192.168.0.220', '6379');
+
 
 
         $expire = 3600;
         $expire = 3600;
 
 
         $key = 'test_';
         $key = 'test_';
 
 
         for($i=0; $i<= 10000;$i++) {
         for($i=0; $i<= 10000;$i++) {
+            $redis->connect('server-redis', '6379');
+            $redis->auth('dm_redis_123');
             $redis->set($key . $i, $i, $expire);
             $redis->set($key . $i, $i, $expire);
         }
         }
 
 
         for($i=0; $i<= 10000;$i++) {
         for($i=0; $i<= 10000;$i++) {
+            $redis->connect('server-redis', '6379');
+            $redis->auth('dm_redis_123');
             $data[] = $redis->get($key . $i);
             $data[] = $redis->get($key . $i);
         }
         }