Commit 684673ce by 宋毅

tj

parent 2180a990
...@@ -27,11 +27,8 @@ class OpPlatformUtils { ...@@ -27,11 +27,8 @@ class OpPlatformUtils {
var reqApiAccessKey = null; var reqApiAccessKey = null;
appKey = appKey && secret ? appKey : settings.appKey; appKey = appKey && secret ? appKey : settings.appKey;
var cacheValue = await cacheManager["ApiAccessKeyCache"].getCache(appKey); var cacheValue = await cacheManager["ApiAccessKeyCache"].getCache(appKey);
if (cacheValue) { if (cacheValue && cacheValue.status == 0) {
var tmpValue = JSON.parse(cacheValue); return cacheValue;
if (tmpValue.status == 0) {
return tmpValue;
}
} }
if (appKey && secret) { if (appKey && secret) {
reqApiAccessKey = await cacheManager["ApiAccessKeyCache"].cache(appKey, null, 10, secret); reqApiAccessKey = await cacheManager["ApiAccessKeyCache"].cache(appKey, null, 10, secret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment