feat : 6 astra improve it
CI / Verify and audit (push) Successful in 2m33s
CI / Build, scan and deploy immutable images (push) Failing after 1m29s

This commit is contained in:
2026-09-22 18:28:18 +07:00 Unverified
parent 88afa8e947
commit 87e6bcd96f
56 changed files with 1351 additions and 511 deletions
+13 -3
View File
@@ -2,7 +2,7 @@ import "server-only";
import { cacheLife, cacheTag } from "next/cache";
import { getPublicGuide, listPublicGuideCards } from "@/lib/guides/queries";
import { getPublicGuide, getPublicGuideSummary, listPublicGuideCards } from "@/lib/guides/queries";
import {
DIRECTORY_CACHE_TAG,
GLOSSARY_CACHE_TAG,
@@ -17,11 +17,21 @@ export async function getCachedPublicGuideCards() {
return listPublicGuideCards();
}
export async function getCachedPublicGuide(slug: string) {
export async function getCachedPublicGuide(slug: string, section = "overview") {
"use cache: remote";
cacheLife({ stale: 15, revalidate: 60, expire: 60 * 60 });
const result = await getPublicGuide(slug);
const result = await getPublicGuide(slug, section);
cacheTag(GLOSSARY_CACHE_TAG);
cacheTag(DIRECTORY_CACHE_TAG);
if (result) cacheTag(pageCacheTag(result.id));
return result;
}
export async function getCachedPublicGuideSummary(slug: string) {
"use cache: remote";
cacheLife({ stale: 15, revalidate: 60, expire: 60 * 60 });
cacheTag(DIRECTORY_CACHE_TAG);
const result = await getPublicGuideSummary(slug);
if (result) cacheTag(pageCacheTag(result.id));
return result;
}