|
@@ -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);
|