Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
CHANGELOG.md Publish Dec 19, 2018
README.md use yarn workspaces Oct 6, 2017
index.js chore(deps): update dependency lru-cache to v5 (#239) Nov 22, 2018
package.json fix: correct homepage URLs (#282) May 20, 2019

README.md

Component Cache

npm npm (scoped with tag)

vue-server-renderer has built-in support for component-level caching. This module automatically adds a LRU cache to project.

Setup

  • Add @nuxtjs/component-cache dependency using yarn or npm to your project
  • Add @nuxtjs/component-cache to modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    '@nuxtjs/component-cache',
    
    // With options
    ['@nuxtjs/component-cache', { maxAge: 1000 * 60 * 60 }],
  ]
}

Options

See component-level caching for mor information.

max

  • default: 10000

maxAge

  • default: 1000 * 60 * 15 (15 minutes)
You can’t perform that action at this time.