Skip to content

Commit

Permalink
🐛 Reduce airtable API cache time
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Feb 18, 2025
1 parent e4d1fc2 commit dc33085
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/constant/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,4 +528,4 @@ export const SEARCH_SUGGESTIONS = [
export const CHRISTMAS_CAMPAIGN_MIN_SPEND = 9;
export const CHRISTMAS_CAMPAIGN_COUPON = 'XMASREAD';

export const BOOKSTORE_CMS_CACHE_RESET_TIMESTAMP = 1737475200;
export const BOOKSTORE_CMS_CACHE_RESET_TIMESTAMP = 1739877450;
4 changes: 2 additions & 2 deletions src/server/api/routes/bookstore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ router.get('/bookstore/tags', async (req, res, next) => {
if (!IS_TESTNET) {
res.set(
'Cache-Control',
'public, max-age=3600, stale-if-error=604800, stale-while-revalidate=604800'
'public, max-age=60, stale-if-error=3600, stale-while-revalidate=3600'
);
}

Expand All @@ -49,7 +49,7 @@ router.get('/bookstore/products', async (req, res, next) => {
if (!IS_TESTNET) {
res.set(
'Cache-Control',
'public, max-age=3600, stale-if-error=604800, stale-while-revalidate=604800'
'public, max-age=60, stale-if-error=3600, stale-while-revalidate=3600'
);
}

Expand Down

0 comments on commit dc33085

Please sign in to comment.