Replies: 1 comment
-
你为啥要关心 key 名?🤔没懂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
举个例子,看代码
`public function getAuthorizerAccessToken(string $appId, string $refreshToken): string
{
$cacheKey = sprintf('open-platform.authorizer_access_token.%s.%s', $appId, md5($refreshToken));
getAuthorizerAccessToken 这个方法中的key是写死的,无法在任何地方修改,切换完Redis后,无法保存成指定的KEY值,只能重写该方法。
现在切换Redis的成本太高了,还要重写CacheInterface方法,能不能修改成可以平滑切换Redis,直接更改配置,就可以使用指定的缓存。
Beta Was this translation helpful? Give feedback.
All reactions