Merged in fix/destination-pages-cache-keys (pull request #1642)
Fix/destination pages cache keys * fix(destionationpages): add tag to citydatabycityidentifier that should invalidate when publishing city * Fixed building tag the same way and added comment why we need this extra tag Approved-by: Erik Tiekstra
This commit is contained in:
@@ -232,6 +232,7 @@ const blocksRefsSchema = z.discriminatedUnion("__typename", [
|
||||
|
||||
export const destinationCityPageRefsSchema = z.object({
|
||||
destination_city_page: z.object({
|
||||
destination_settings: destinationCityPageDestinationSettingsSchema,
|
||||
sidepeek_content: z
|
||||
.object({
|
||||
content: z.object({
|
||||
|
||||
@@ -29,6 +29,11 @@ export function generatePageTags(
|
||||
): string[] {
|
||||
const connections = getConnections(validatedData)
|
||||
return [
|
||||
// This tag is added for the city list data on country pages to invalidate the list when city page changes.
|
||||
generateTag(
|
||||
lang,
|
||||
`city_list_data:${validatedData.destination_city_page.destination_settings.city}`
|
||||
),
|
||||
generateTagsFromSystem(lang, connections),
|
||||
generateTag(lang, validatedData.destination_city_page.system.uid),
|
||||
].flat()
|
||||
|
||||
Reference in New Issue
Block a user