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:
Linus Flood
2025-02-07 07:02:53 +00:00
parent 1d822dad5a
commit c0f5c0278b
5 changed files with 24 additions and 26 deletions

View File

@@ -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
)