add Discord Me cache
This commit is contained in:
parent
0393ab8b89
commit
d95d78f5a2
4 changed files with 60 additions and 2 deletions
|
|
@ -128,7 +128,9 @@ HTML,
|
|||
try {
|
||||
$u = static::getU();
|
||||
if ($u === null) return null;
|
||||
return Auth::getMe($u);
|
||||
$cachedMe = Redis::getCachedMe($_COOKIE['u']);
|
||||
if ($cachedMe === null) return Redis::cacheMe($_COOKIE['u'], Auth::getMe($u));
|
||||
return $cachedMe;
|
||||
} catch (Exception) {
|
||||
error_log('Failed to getMe.');
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue