clear cache of Me when logout
This commit is contained in:
parent
d95d78f5a2
commit
ad6d884437
3 changed files with 14 additions and 2 deletions
|
|
@ -51,4 +51,14 @@ class Redis
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static function unsetMe(string $u): void
|
||||
{
|
||||
try {
|
||||
$redis = static::connect();
|
||||
$redis->unlink(static::getKey($u));
|
||||
} catch (\RedisException $e) {
|
||||
trigger_error($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue