소스 검색

测试 easy 5.0, 设置Redis 缓存

liuzejian 1 년 전
부모
커밋
afb8b347a3
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      app/Console/Commands/WechatPlatform/Test.php

+ 3 - 0
app/Console/Commands/WechatPlatform/Test.php

@@ -7,6 +7,7 @@ use App\Service\Util\Support\Trace\TraceContext;
 use App\Service\WechatPlatform\WechatPlatformConstService;
 use EasyWeChat\Factory;
 use Illuminate\Console\Command;
+use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\DB;
 
 
@@ -43,6 +44,8 @@ class Test extends Command
             ],
         ];
         $openPlatform = Factory::openPlatform($config);
+        $openPlatform->rebind('cache', Cache::store('redis'));
+
         $officialAccount = $openPlatform->officialAccount('wxebcb86ec4b80eaca',
             'refreshtoken@@@pOdN-RBZ1f475kZxXM66IcG2keHkv8V0mDs97JYa2TQ');