Merged in fix/book-785-hotelfilters-cache (pull request #3533)
fix(BOOK-785): fix incorrect cache keys for contact config and hotel filters * fix(BOOK-785): fix incorrect cache keys for contact config and hotel filters
This commit is contained in:
@@ -46,7 +46,7 @@ const getContactConfig = cache(async (lang: Lang) => {
|
|||||||
GetContactConfig,
|
GetContactConfig,
|
||||||
variables,
|
variables,
|
||||||
{
|
{
|
||||||
key: `${lang}:contact`,
|
key: `${lang}:contact_config`,
|
||||||
ttl: "max",
|
ttl: "max",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import type { FilterType, HotelFilter } from "./output"
|
|||||||
|
|
||||||
export async function getHotelFilters(lang: Lang) {
|
export async function getHotelFilters(lang: Lang) {
|
||||||
const cacheClient = await getCacheClient()
|
const cacheClient = await getCacheClient()
|
||||||
const cacheKey = `${lang}:getHotelFilters`
|
const cacheKey = `${lang}:hotel_filter:outer`
|
||||||
|
|
||||||
return await cacheClient.cacheOrGet(
|
return await cacheClient.cacheOrGet(
|
||||||
cacheKey,
|
cacheKey,
|
||||||
@@ -27,7 +27,7 @@ export async function getHotelFilters(lang: Lang) {
|
|||||||
const response = await request<unknown>(
|
const response = await request<unknown>(
|
||||||
GetHotelFilters,
|
GetHotelFilters,
|
||||||
{ locale: lang },
|
{ locale: lang },
|
||||||
{ key: `${lang}:hotel_filters`, ttl: "1d" }
|
{ key: `${lang}:hotel_filter`, ttl: "1d" }
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!response.data) {
|
if (!response.data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user