dever 6 vuotta sitten
vanhempi
commit
439a43e9f2
1 muutettua tiedostoa jossa 22 lisäystä ja 0 poistoa
  1. 22 0
      main/src/Content.php

+ 22 - 0
main/src/Content.php

@@ -137,6 +137,28 @@ class Content extends Core
         return 'ok';
     }
 
+    public function testcache()
+    {
+        # 测试缓存
+        $redis = new \Redis;
+
+        $redis->connect('192.168.0.220', '6379');
+
+        $expire = 3600;
+
+        $key = 'test_';
+
+        for($i=0; $i<= 10000;$i++) {
+            $this->redis->set($key . $i, $i, $expire);
+        }
+
+        for($i=0; $i<= 10000;$i++) {
+            $data[] = $this->redis->get($key . $i);
+        }
+
+        print_r($data);die;
+    }
+
     public function test()
     {
         $journal = Dever::db('journal/info')->one(8);