feat : site cache
This commit is contained in:
@@ -60,8 +60,12 @@ class SiteCache
|
||||
|
||||
$siteKey = CommonRedisKey::siteListKey();
|
||||
|
||||
$siteList = json_decode($this->redis->get($siteKey), true);
|
||||
$siteListJsonDecode = json_decode($this->redis->get($siteKey,RedisCode::SYSTEM_DB), true);
|
||||
if (empty($siteListJsonDecode)) return null;
|
||||
|
||||
$siteList = array_column($siteListJsonDecode, null, 'id');
|
||||
|
||||
unset($siteListJsonDecode);
|
||||
return $siteList[$siteId] ?? null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user