diff --git a/apps/infoalloggi/src/pages/area-riservata/admin/impostazioni.tsx b/apps/infoalloggi/src/pages/area-riservata/admin/impostazioni.tsx index d353238..def051c 100644 --- a/apps/infoalloggi/src/pages/area-riservata/admin/impostazioni.tsx +++ b/apps/infoalloggi/src/pages/area-riservata/admin/impostazioni.tsx @@ -20,7 +20,6 @@ const Impostazioni: NextPageWithLayout = () => { - {/* */} ); @@ -71,45 +70,3 @@ const StripeSection = () => { ); }; - -// const RedisCacheSection = () => { -// const { data, isLoading } = api.revalidation.getRedisStats.useQuery(); -// const utils = api.useUtils(); -// const { mutate } = api.revalidation.invalidateRedisCache.useMutation({ -// onMutate() { -// toast.loading("Invalidating cache...", { -// id: "invalidate-cache", -// }); -// }, -// onSuccess: async () => { -// toast.success("Cache invalidated successfully!", { -// id: "invalidate-cache", -// }); -// await utils.revalidation.getRedisStats.invalidate(); -// }, -// onError() { -// toast.error("Failed to invalidate cache.", { -// id: "invalidate-cache", -// }); -// }, -// }); -// if (isLoading) { -// return ; -// } -// return ( -//
-//

Invalidate Redis Cache

-//

Current Cache Stats:

-// {data?.success ? ( -//
    -//
  • Pdf Schede Annuncio: {data?.schedaCount}
  • -//
  • Pdf Condizioni: {data?.condizioniCount}
  • -//
-// ) : ( -//
Error fetching cache stats
-// )} - -// -//
-// ); -// }; diff --git a/apps/infoalloggi/src/server/api/routers/revalidation.ts b/apps/infoalloggi/src/server/api/routers/revalidation.ts index c4c5b36..1031e0a 100644 --- a/apps/infoalloggi/src/server/api/routers/revalidation.ts +++ b/apps/infoalloggi/src/server/api/routers/revalidation.ts @@ -130,22 +130,4 @@ export const revalidationRouter = createTRPCRouter({ }); } }), - getRedisStats: adminProcedure.query(async () => { - return "await getCacheStats();"; - }), - invalidateRedisCache: adminProcedure.mutation(async () => { - try { - return { - status: "success", - }; - } catch (err) { - console.error("Invalidate Redis cache error:", err); - throw new TRPCError({ - code: "INTERNAL_SERVER_ERROR", - message: - err instanceof Error ? err.message : "Invalidate Redis cache failed", - cause: err, - }); - } - }), });