From f3d5ca7ad8098730b204091aab2221bff9f9e982 Mon Sep 17 00:00:00 2001 From: cp-jagruti-a Date: Fri, 5 Jan 2024 11:13:53 +0530 Subject: [PATCH] Enhance : Unification in services page --- nuxt-frontend/nuxt.config.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/nuxt-frontend/nuxt.config.js b/nuxt-frontend/nuxt.config.js index fe0c95801..ec041df91 100644 --- a/nuxt-frontend/nuxt.config.js +++ b/nuxt-frontend/nuxt.config.js @@ -8,18 +8,6 @@ export default defineNuxtConfig({ htmlAttrs: { lang: "en", }, - routeRules: { - "/assets/images/**": { - headers: { - "cache-control": `public,max-age=${yearInSeconds},s-maxage=${yearInSeconds}`, - }, - }, - "/_nuxt/**": { - headers: { - "cache-control": `public,max-age=${yearInSeconds},s-maxage=${yearInSeconds}`, - }, - }, - }, }, }, devtools: { enabled: true }, @@ -49,4 +37,11 @@ export default defineNuxtConfig({ failOnError: false, }, }, + render: { + // Setting up cache for 'static' directory - a year in milliseconds + // https://web.dev/uses-long-cache-ttl + static: { + maxAge: 60 * 60 * 24 * 365 * 1000, + }, + }, });