fix seo and first page and 404 page
This commit is contained in:
+8
-1
@@ -1,6 +1,10 @@
|
||||
const WP_API_BASE = "https://wpa.feep.ir/wp-json/wp/v2";
|
||||
const FETCH_TIMEOUT_MS = 15_000;
|
||||
|
||||
/** کش مقالات وردپرس: یک ساعت. با revalidateTag('blog-posts') از API میتوان کش را پاک کرد. */
|
||||
const CACHE_REVALIDATE_SECONDS = 3600;
|
||||
const CACHE_TAG_BLOG = "blog-posts";
|
||||
|
||||
export interface WpMediaSize {
|
||||
source_url: string;
|
||||
width?: number;
|
||||
@@ -86,7 +90,10 @@ async function fetchWithTimeout(
|
||||
const res = await fetch(url, {
|
||||
...options,
|
||||
signal: controller.signal,
|
||||
next: { revalidate: 0 },
|
||||
next: {
|
||||
revalidate: CACHE_REVALIDATE_SECONDS,
|
||||
tags: [CACHE_TAG_BLOG],
|
||||
},
|
||||
});
|
||||
clearTimeout(timeout);
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user