12345678910111213141516171819 |
- <?php
- namespace app\controller;
- use app\BaseController;
- use think\facade\Cache;
- class Index extends BaseController
- {
- public function index()
- {
- Cache::store('redis')->set("name","redis测试",3600);
- echo Cache::store('redis')->get("name");
- }
- public function hello($name = 'ThinkPHP6')
- {
- return 'hello,' . $name;
- }
- }
|