This commit is contained in:
Adisak 2026-06-12 10:01:07 +07:00
parent 664f5153da
commit 055e24273d
2 changed files with 19 additions and 1 deletions

View file

@ -1718,6 +1718,24 @@ async function clearMenuAndRoleCache(): Promise<void> {
await delAsync(...roleKeys);
console.log(`[AMQ] Cleared ${roleKeys.length} role cache keys`);
}
const posMasterKeys = await keysAsync("posMaster_*");
if (posMasterKeys.length > 0) {
await delAsync(...posMasterKeys);
console.log(`[AMQ] Cleared ${posMasterKeys.length} posMaster cache keys`);
}
const userKeys = await keysAsync("user_*");
if (userKeys.length > 0) {
await delAsync(...userKeys);
console.log(`[AMQ] Cleared ${userKeys.length} user cache keys`);
}
const orgKeys = await keysAsync("org_*");
if (orgKeys.length > 0) {
await delAsync(...orgKeys);
console.log(`[AMQ] Cleared ${orgKeys.length} org cache keys`);
}
} finally {
redisClient.quit();
}