From a5114d12d0dc7c6f603699af56818c699fe048b1 Mon Sep 17 00:00:00 2001 From: Zohan Subhash Date: Thu, 26 Jan 2023 16:52:36 +0530 Subject: [PATCH] Update top-langs.js --- api/wild/top-langs.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/api/wild/top-langs.js b/api/wild/top-langs.js index 1c908267..8fefa0e1 100644 --- a/api/wild/top-langs.js +++ b/api/wild/top-langs.js @@ -16,7 +16,6 @@ export default async (req, res) => { text_color, bg_color, theme, - cache_seconds, layout, border_radius, border_color, @@ -63,19 +62,6 @@ export default async (req, res) => { const title = req.query.title || "Most Used Languages"; - const cacheSeconds = clampValue( - parseInt(cache_seconds || CONSTANTS.FOUR_HOURS, 10), - CONSTANTS.FOUR_HOURS, - CONSTANTS.ONE_DAY, - ); - - res.setHeader( - "Cache-Control", - `max-age=${ - cacheSeconds / 2 - }, s-maxage=${cacheSeconds}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, - ); - return res.send( renderTopLanguages(topLangs, { hide_title: parseBoolean(hide_title), @@ -93,7 +79,6 @@ export default async (req, res) => { }), ); } catch (err) { - res.setHeader("Cache-Control", `no-cache, no-store, must-revalidate`); // Don't cache error responses. return res.send(renderError(err.message, err.secondaryMessage)); } };