diff --git a/apps/cow-fi/next.config.js b/apps/cow-fi/next.config.js index 914f6503b2..a22161afeb 100644 --- a/apps/cow-fi/next.config.js +++ b/apps/cow-fi/next.config.js @@ -100,7 +100,7 @@ const nextConfig = { headers: [ { key: 'Cache-Control', - value: 'public, s-maxage=60, stale-while-revalidate=600', + value: 'public, s-maxage=60, stale-while-revalidate=300', }, ], }, diff --git a/apps/cow-fi/services/cms/index.ts b/apps/cow-fi/services/cms/index.ts index ef79552118..a6a2555d91 100644 --- a/apps/cow-fi/services/cms/index.ts +++ b/apps/cow-fi/services/cms/index.ts @@ -4,9 +4,9 @@ import qs from 'qs' import { toQueryParams } from 'util/queryParams' import { getCmsClient } from '@cowprotocol/core' -import { DATA_CACHE_TIME_SECONDS } from '@/const/meta' const PAGE_SIZE = 50 +const CMS_CACHE_TIME = 5 * 60 // 5 min type Schemas = components['schemas'] export type Article = Schemas['ArticleListResponseDataItem'] @@ -33,7 +33,7 @@ export const client = getCmsClient() const clientAddons = { // https://github.com/openapi-ts/openapi-typescript/issues/1569#issuecomment-1982247959 - fetch: (request: unknown) => fetch(request as Request, { next: { revalidate: DATA_CACHE_TIME_SECONDS } }), + fetch: (request: unknown) => fetch(request as Request, { next: { revalidate: CMS_CACHE_TIME } }), } /**