12 lines
282 B
TypeScript
12 lines
282 B
TypeScript
"use server";
|
|
|
|
import { revalidatePath, revalidateTag } from "next/cache";
|
|
|
|
export async function refreshWeatherData() {
|
|
// Perform your mutation or database operation here
|
|
|
|
// Revalidate the specific path
|
|
revalidatePath("/weather");
|
|
revalidateTag("weather-data", "max");
|
|
}
|