mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: fix user cache
This commit is contained in:
1 parent
e56655abef
commit
1ffac5c43d
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.32.29",
|
||||
"version": "2.32.30",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -35,7 +35,7 @@ export function deleteUserCache(udoc: User | Udoc | string | undefined | null, r
|
||||
return;
|
||||
}
|
||||
const id = [`id/${udoc._id.toString()}`, `name/${udoc.uname.toLowerCase()}`, `mail/${udoc.mail.toLowerCase()}`];
|
||||
for (const key of cache.keys().filter((k) => id.includes(k.split('/')[0]))) {
|
||||
for (const key of cache.keys().filter((k) => id.includes(`${k.split('/')[0]}/${k.split('/')[1]}`))) {
|
||||
cache.del(key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user