File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,9 @@ public static function knows()
152152 }
153153}
154154
155+ // 查看待缓存的已考知识点数据
156+ dump (Cache::knows ());
157+
155158// 缓存统计结果到 redis
156159$ client = new Predis \Client ('tcp://127.0.0.1:6379 ' );
157160$ client ->set ('phpems:questions ' , json_encode (Cache::questions ()));
@@ -161,8 +164,9 @@ public static function knows()
161164/* 在控制器中可以直接读取缓存并在模板中使用
162165 $client = new Predis\Client('tcp://127.0.0.1:6379');
163166 $questions = $client->get('phpems:questions');
164- $questions = json_decode($questions,true);
167+ $questions = json_decode($questions, true);
168+ $knows = $client->get('phpems:knows');
169+ $knows = json_decode($knows, true);
165170 // $this->tpl->assign('questions', $questions);
166- dd($questions);
167- */
168-
171+ dd($knows);
172+ */
You can’t perform that action at this time.
0 commit comments