x
This commit is contained in:
1 parent
8b73b8dd2f
commit
f7ac94ca0d
5 files changed
+7
-7
No files matched your search
@@ -28,7 +28,7 @@ const STATS = [
|
||||
|
||||
export default async function AboutPage({ params }: { params: Promise<{ lang: string }> }) {
|
||||
const { lang } = await params;
|
||||
const res = await fetch(`${API_BASE}/settings?lang=${lang}`, { next: { revalidate: 600 } });
|
||||
const res = await fetch(`${API_BASE}/settings?lang=${lang}`, { next: { revalidate: 0 } });
|
||||
const settings = res.ok ? await res.json() : {};
|
||||
const brandName = settings?.brandName || '';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { API_BASE } from '@/lib/api'
|
||||
|
||||
async function getArticle(slug: string): Promise<Article | null> {
|
||||
try {
|
||||
const res = await fetch(`${API_BASE}/articles/${slug}`, { next: { revalidate: 300 } })
|
||||
const res = await fetch(`${API_BASE}/articles/${slug}`, { next: { revalidate: 0 } })
|
||||
return res.ok ? res.json() : null
|
||||
} catch { return null }
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ type CategoryProductsResponse = {
|
||||
|
||||
async function getCategoryProducts(id: string, lang: string): Promise<ApiResult<CategoryProductsResponse>> {
|
||||
return await fetchJsonResult<CategoryProductsResponse>(`/categories/${id}/products?limit=1000&lang=${lang}`, {
|
||||
next: { revalidate: 60 },
|
||||
next: { revalidate: 0 },
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export async function generateMetadata({ params }: { params: Promise<{ lang: str
|
||||
}
|
||||
|
||||
// Cache configuration: 0 for dev (no cache), strict numbers for production
|
||||
const getCacheTime = (prodSeconds: number) => process.env.NODE_ENV === 'development' ? 0 : prodSeconds;
|
||||
const getCacheTime = (prodSeconds: number) => 0; // Temporary bypass for 5-day testing
|
||||
|
||||
// Fetch categories for Navbar and Footer on the server
|
||||
async function getCategories(lang: string) {
|
||||
|
||||
Reference in new issue
Block a user