mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-23 10:55:33 -05:00
Move app to apps/web-react in pnpm workspace layout
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { refreshApiTokensCache } from "~/features/api-public/api-public-utils.server";
|
||||
import { refreshBannedCache } from "~/features/ban/core/banned.server";
|
||||
import { clearParticipationInfoMap } from "~/features/front-page/core/ShowcaseTournaments.server";
|
||||
import { refreshSendouQInstance } from "~/features/sendouq/core/SendouQ.server";
|
||||
import { clearSeasonSkillsCache } from "~/features/sendouq/q-utils.server";
|
||||
import {
|
||||
clearAllTournamentDataCache,
|
||||
refreshRunningTournaments,
|
||||
} from "~/features/tournament-bracket/core/Tournament.server";
|
||||
import { refreshTentativeTiersCache } from "~/features/tournament-organization/core/tentativeTiers.server";
|
||||
import { clearUserCardCache } from "~/features/user-card/UserCardRepository.server";
|
||||
import { cache } from "~/utils/cache.server";
|
||||
|
||||
/**
|
||||
* Clears and refreshes every in-process cache, so the server serves what is in
|
||||
* the database right now. E2E workers call this (via the route) after writing
|
||||
* test data straight into the database file.
|
||||
*/
|
||||
export async function refreshCaches() {
|
||||
clearAllTournamentDataCache();
|
||||
clearParticipationInfoMap();
|
||||
clearSeasonSkillsCache();
|
||||
clearUserCardCache();
|
||||
cache.clear();
|
||||
await refreshBannedCache();
|
||||
await refreshSendouQInstance();
|
||||
await refreshTentativeTiersCache();
|
||||
await refreshApiTokensCache();
|
||||
await refreshRunningTournaments();
|
||||
}
|
||||
Reference in New Issue
Block a user