Skip to main content


NPM   NPM downloads

This plugin caches your build files locally or in the Netlify cache directory. It will massively speed up subsequent builds.

☁️ Installation

npm install gatsby-plugin-netlify-cache

🛫 Setup

Add 'gatsby-plugin-netlify-cache' to the plugins in your gatsby-config.js file.

✋ Usage


In your local environment nothing happens to avoid conflicts with your development process. It actually checks if process.env.NETLIFY_BUILD_BASE exists to detect a Netlify environment.


It automatically restores your cache and caches new files within the Netlify cache folder. This folder is undocumented but works fine. To reset the cache, hit the Clear build cache checkbox in the Netlify app.

These folders are cached:

  • .cache directory
  • public directory

⚙️ Configuration

There is no configuration yet.