Tune caching: shorter revalidate, lighter fetches, on-demand purge.
Use paginated list fetches with stripped list payloads, recent-item helpers for carousels, fetch tags + POST /api/revalidate, and 5-minute page ISR instead of 1 hour. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
f341b010c0
commit
02c7dd51d2
@@ -11,7 +11,9 @@ import { ProjectGallery } from "@/components/shared/ProjectGallery";
|
||||
import { SiteFooter } from "@/components/SiteFooter";
|
||||
import { SiteHeader } from "@/components/SiteHeader";
|
||||
import { servicesPage } from "@/data/site";
|
||||
import { getPortfolios, toDisplayProject } from "@/lib/api";
|
||||
import { getRecentPortfolios, toDisplayProject } from "@/lib/api";
|
||||
|
||||
export const revalidate = 300; // keep in sync with api.ts PAGE_REVALIDATE_SECONDS
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "خدمات ما",
|
||||
@@ -20,7 +22,7 @@ export const metadata: Metadata = {
|
||||
};
|
||||
|
||||
export default async function ServicesPage() {
|
||||
const portfolios = await getPortfolios();
|
||||
const portfolios = await getRecentPortfolios(12);
|
||||
const displayProjects = portfolios.map(toDisplayProject);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user