Merged in feat/book-228-campaign (pull request #2818)

feat(book-228): campaign cache fixes

* feat(book-228): campaign cache fixes


Approved-by: Erik Tiekstra
Approved-by: Joakim Jäderberg
Approved-by: Matilda Landström
This commit is contained in:
Linus Flood
2025-09-17 07:57:51 +00:00
parent 5a86cbaafe
commit eea2a63835
2 changed files with 10 additions and 10 deletions

View File

@@ -117,7 +117,11 @@ export async function getCampaignPagesByHotelPageUid(
})
metricsGetCampaignPagesByHotelUidRefs.start()
const refsTag = generateRefsResponseTag(
lang,
`${hotelPageUid}-${today}`,
"hotel_page_campaigns"
)
const refsResponse = await request<GetCampaignPagesByHotelUidRefsData>(
GetCampaignPagesByHotelUidRefs,
{
@@ -126,12 +130,8 @@ export async function getCampaignPagesByHotelPageUid(
today,
},
{
key: generateRefsResponseTag(
lang,
`${hotelPageUid}-${today}`,
"hotel_page_campaigns"
),
ttl: "max",
key: refsTag,
ttl: "1d",
}
)
@@ -176,8 +176,8 @@ export async function getCampaignPagesByHotelPageUid(
today,
},
{
key: tags,
ttl: "max",
key: [...tags, refsTag],
ttl: "1d",
}
)

View File

@@ -77,7 +77,7 @@ export function generateTagsFromSystem(
connections: System["system"][]
) {
return connections.map((system) => {
return generateRefTag(
return generateTag(
system.locale ?? lang,
system.content_type_uid,
system.uid