Skip to content

Commit

Permalink
Set max-age for feature exhibition API query to 24 hours [WEB-2936]
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiltri committed Oct 18, 2024
1 parent b1fe242 commit a04de1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/js/behaviors/core/primaryNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export default function(container) {
`${exhibitionApiPath}?${featuredExhibitionApiQuery.toString()}`,
container.dataset.apiUrl
)
fetch(featuredExhibitionData, { cache: 'force-cache' })
fetch(featuredExhibitionData, {
headers: {
'Cache-Control': 'max-age=86400' // 86400 = 24 hours
}
})
.then(response => response.json())
.then(exhibitionHandler)
menuItems.forEach(function(menuItem) {
Expand Down

0 comments on commit a04de1e

Please sign in to comment.