diff --git a/apps/frontend/src/layouts/default.vue b/apps/frontend/src/layouts/default.vue index b01db80089..8670de42a0 100644 --- a/apps/frontend/src/layouts/default.vue +++ b/apps/frontend/src/layouts/default.vue @@ -970,13 +970,10 @@ const showTinMismatchBanner = computed(() => { const PRIDE_COLLECTION_ID = 'M4c3ITvd' const PRIDE_ARTICLE_SLUGS = ['pride-campaign-2025', 'pride-campaign-2026', 'proud-of-you-2026'] -const PRIDE_CACHE_TIME = 1000 * 60 * 60 * 24 const { data: prideCollection } = useQuery({ queryKey: computed(() => ['collection', PRIDE_COLLECTION_ID]), queryFn: () => client.labrinth.collections.get(PRIDE_COLLECTION_ID), - staleTime: PRIDE_CACHE_TIME, - gcTime: PRIDE_CACHE_TIME, }) const prideProjectIds = computed(() => new Set(prideCollection.value?.projects ?? [])) diff --git a/apps/frontend/src/plugins/tanstack.ts b/apps/frontend/src/plugins/tanstack.ts index 7c859b2722..c201586874 100644 --- a/apps/frontend/src/plugins/tanstack.ts +++ b/apps/frontend/src/plugins/tanstack.ts @@ -29,6 +29,9 @@ export default defineNuxtPlugin((nuxt) => { if (import.meta.server) { nuxt.hooks.hook('app:rendered', () => { vueQueryState.value = dehydrate(queryClient) + + // Hack to prevent memory leak when gcTime is being set on the server side. + queryClient.clear() }) }