🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@vue-storefront/http-cache

Package Overview
Dependencies
Maintainers
8
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue-storefront/http-cache

This module handles adding http-cache header to document after render for caching capabilities

2.8.0
latest
Source
npm
Version published
Weekly downloads
1.3K
19.53%
Maintainers
8
Weekly downloads
 
Created
Source

Nuxt Cache Control Module

This module handles adding http-cache header to document after render for caching capabilities

How to install

Add dependendy:

yarn add @vue-storefront/http-cache

Add it to modules in your nuxt.config.js:

['@vue-storefront/http-cache/nuxt']

Configuration details

default

This property allows you do override default value of http-cache header which is initially set to max-age=60

['@vue-storefront/http-cache/nuxt', {
  default: 'max-age=120'
}]

matchRoute

Customize http-cache values for selected routes. you can use * for a wildcard. To remove http-cache header use none value.

['@vue-storefront/http-cache/nuxt', {
  matchRoute: {
    '/': 'max-age=240',
    '/p/*': 'max-age=360',
    '/c/*': 'none'
  }
}]

FAQs

Package last updated on 27 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts