feat: redis
This commit is contained in:
@@ -13,6 +13,7 @@ namespace App\Service\ServiceTrait\Api;
|
||||
use App\Cache\Redis\Api\ApiRedisKey;
|
||||
use App\Cache\Redis\Common\CommonRedisKey;
|
||||
use App\Cache\Redis\RedisCache;
|
||||
use App\Constants\RedisCode;
|
||||
use App\Exception\ErrException;
|
||||
use App\Lib\Log;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
@@ -75,7 +76,7 @@ trait WxMiniTrait
|
||||
|
||||
if (empty($data) || empty($data['access_token']) || empty($data['expires_in'])) return '';
|
||||
|
||||
$this->redisCache->setEx($key, $data['access_token'], $data['expires_in'] - 10,'system');
|
||||
$this->redisCache->setEx($key, $data['access_token'], $data['expires_in'] - 10,RedisCode::SYSTEM_DB);
|
||||
|
||||
return $data['access_token'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user