Merged in feat/skeletons-and-cache (pull request #1273)
feat: skeleton key bullet proof. 10 min cache on city search response * feat: skeleton key bullet proof. 10 min cache on city search response * Refactor server.ts Approved-by: Michael Zetterberg
This commit is contained in:
@@ -238,9 +238,13 @@ export const hotelQueryRouter = router({
|
||||
const apiResponse = await api.get(
|
||||
api.endpoints.v1.Availability.city(cityId),
|
||||
{
|
||||
cache: undefined,
|
||||
headers: {
|
||||
Authorization: `Bearer ${ctx.serviceToken}`,
|
||||
},
|
||||
next: {
|
||||
revalidate: env.CACHE_TIME_CITY_SEARCH,
|
||||
},
|
||||
},
|
||||
params
|
||||
)
|
||||
@@ -354,9 +358,13 @@ export const hotelQueryRouter = router({
|
||||
const apiResponse = await api.get(
|
||||
api.endpoints.v1.Availability.hotels(),
|
||||
{
|
||||
cache: undefined,
|
||||
headers: {
|
||||
Authorization: `Bearer ${ctx.serviceToken}`,
|
||||
},
|
||||
next: {
|
||||
revalidate: env.CACHE_TIME_CITY_SEARCH,
|
||||
},
|
||||
},
|
||||
params
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user