Merged in fix/cache-breakfast-package (pull request #1664)
Fix(breakfast): added hotelId to cache key for breakfast package * Fix(breakfast): added hotelId to cache key for breakfast package Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -1358,7 +1358,7 @@ export const hotelQueryRouter = router({
|
||||
const lang = input.lang ?? ctx.lang
|
||||
const cacheClient = await getCacheClient()
|
||||
return await cacheClient.cacheOrGet(
|
||||
`${ctx.lang}:getLocations`,
|
||||
`${lang}:getLocations`,
|
||||
async () => {
|
||||
const countries = await getCountries({
|
||||
lang: lang,
|
||||
@@ -1704,7 +1704,7 @@ export const hotelQueryRouter = router({
|
||||
|
||||
const cacheClient = await getCacheClient()
|
||||
const breakfastPackages = await cacheClient.cacheOrGet(
|
||||
`${apiLang}:adults${input.adults}:startDate:${params.StartDate}:endDate:${params.EndDate}`,
|
||||
`${apiLang}:adults${input.adults}:startDate:${params.StartDate}:endDate:${params.EndDate}:hotel:${input.hotelId}`,
|
||||
async () => {
|
||||
const apiResponse = await api.get(
|
||||
api.endpoints.v1.Package.Breakfast.hotel(input.hotelId),
|
||||
|
||||
Reference in New Issue
Block a user