Merged in fix/cache-graphql-data (pull request #2248)

fix: add missing cache for cms data

* fix: cache cms data


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-05-28 08:28:21 +00:00
committed by Linus Flood
parent 1d733c5ca3
commit 26b005d72a
4 changed files with 24 additions and 11 deletions

View File

@@ -25,6 +25,10 @@ export default async function CurrentContentPage({
{
locale: params.lang,
url: searchParams.uri,
},
{
key: `${params.lang}:current-block-page:${searchParams.uri}`,
ttl: "max",
}
)
@@ -38,7 +42,11 @@ export default async function CurrentContentPage({
// This is currently to be considered a temporary solution to provide the tracking with a few values in english to align with existing reports
const pageDataForTracking = await request<TrackingData>(
GetCurrentBlockPageTrackingData,
{ uid: response.data.all_current_blocks_page.items[0].system.uid }
{ uid: response.data.all_current_blocks_page.items[0].system.uid },
{
key: `${params.lang}:current-block-page-tracking:${searchParams.uri}`,
ttl: "max",
}
)
const pageData = response.data.all_current_blocks_page.items[0]