Nuxt Page Cache

screenshot of Nuxt Page Cache
nuxt
vue

nuxt-page-cache is a module for page-level caching

Overview

The @kimyvgy/nuxt-page-cache is a Node Package Manager (NPM) module that provides page-level caching functionality for Nuxt.js, particularly for multi-store setups. It is built upon the arash16/nuxt-ssr-cache module and includes additional features. The module supports multiple stores including Memory, Redis, Memcached, IORedis, and Multi-cache layered setups.

Features

  • Supported Stores: The module supports various cache stores including Memory, Redis, Memcached, IORedis, and Multi-cache layered setups.
  • Page Cache Options: Users can choose from different cache stores provided by the module, such as Redis, Memcached, IORedis, and Multi-cache layered options.
  • Version Property: The module allows users to define a version property in the root-level nuxt.config.js or inside module options. This version property must have a unique value for each release to ensure that cached pages are purged after deploying to production.

Setup

To activate the module, add the following code in your nuxt.config.js file:

// nuxt.config.js
{
  modules: [
    '@kimyvgy/nuxt-page-cache'
  ],
}

Alternatively, you can provide the cache property in the nuxt.config.js file:

// nuxt.config.js
{
  cache: {
    /* Cache options here */
  },
}

Summary

The @kimyvgy/nuxt-page-cache module is a powerful package for enabling page-level caching in Nuxt.js applications, especially for multi-store setups. It supports various cache stores such as Memory, Redis, Memcached, IORedis, and Multi-cache layered options. Additionally, it provides the ability to define a version property to ensure cached pages are purged after each deployment in the production environment.Overall, this module is a useful tool for optimizing the performance and speed of Nuxt.js applications.

nuxt
Nuxt

nuxt.js is a lightweight and flexible JavaScript framework that allows developers to easily build dynamic and reactive user interfaces. Its intuitive syntax, modular architecture, and focus on performance make it a popular choice for modern web development.

vue
Vue

Vue.js is a lightweight and flexible JavaScript framework that allows developers to easily build dynamic and reactive user interfaces. Its intuitive syntax, modular architecture, and focus on performance make it a popular choice for modern web development.