feat : update
This commit is contained in:
Vendored
+10
-3
@@ -2,14 +2,21 @@ import "server-only";
|
||||
|
||||
import { cacheLife, cacheTag } from "next/cache";
|
||||
|
||||
import { getActiveStygianSchedule } from "@/lib/stygian/repository";
|
||||
import { getStygianSchedule, listStygianSchedules } from "@/lib/stygian/repository";
|
||||
import { STYGIAN_CACHE_TAG } from "@/lib/cache/tags";
|
||||
|
||||
export { STYGIAN_CACHE_TAG };
|
||||
|
||||
export async function getCachedActiveStygianSchedule() {
|
||||
export async function getCachedStygianSchedule(scheduleId: number) {
|
||||
"use cache: remote";
|
||||
cacheLife({ stale: 30, revalidate: 60, expire: 60 * 60 });
|
||||
cacheTag(STYGIAN_CACHE_TAG);
|
||||
return getActiveStygianSchedule();
|
||||
return getStygianSchedule(scheduleId);
|
||||
}
|
||||
|
||||
export async function getCachedStygianSchedules() {
|
||||
"use cache: remote";
|
||||
cacheLife({ stale: 30, revalidate: 60, expire: 60 * 60 });
|
||||
cacheTag(STYGIAN_CACHE_TAG);
|
||||
return listStygianSchedules();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user