@vue-storefront/http-cache

2.8.0 • Public • Published

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'
  }
}]

Readme

Keywords

none

Package Sidebar

Install

npm i @vue-storefront/http-cache

Weekly Downloads

761

Version

2.8.0

License

MIT

Unpacked Size

2.52 kB

Total Files

6

Last publish

Collaborators

  • mtokarskivsf
  • dzalewski
  • rickrohrig
  • macryb
  • skirianov
  • wojciechsikora
  • filrak
  • fifciuu
  • lukasborawski