Files
dashboard-icons/web/src/lib/revalidate.ts
2025-10-01 19:01:31 +02:00

22 lines
511 B
TypeScript

"use server"
import { revalidatePath, revalidateTag } from "next/cache"
/**
* Revalidate the community page cache
* Can be called from server actions after submission approval/rejection
*/
export async function revalidateCommunityPage() {
revalidatePath("/community")
revalidateTag("community-gallery")
}
/**
* Revalidate all submission-related caches
*/
export async function revalidateSubmissions() {
revalidateTag("community-gallery")
revalidatePath("/community")
revalidatePath("/dashboard")
}