• This repository has been archived on 15/Jun/2021
  • Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    JavaScript
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Caches your Gatsby .cache and public folder to speed up your build time by 10x

THIS PLUGIN IS DEPRECATED

In favor of https://github.com/netlify/netlify-plugin-gatsby, this plugin will get no more new releases.


gatsby-plugin-netlify-cache (DEPRECATED)

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

Locally

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.

Netlify

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 by default:

  • .cache directory

⚙️ Configuration

cachePublic - default: false

The Public directory used to be cached by default.

It was disabled by default as over time, caching the Public directory can result in a huge directory size which can break your Netlify build.

Enable this option with caution.

plugins: [
  {
    resolve: "gatsby-plugin-netlify-cache",
    options: {
      cachePublic: true
    }
  }
]

extraDirsToCache - default: []

If you need additional directories to be cached, you can use the option extraDirsToCache to include one or multiple directories in the Netlify cache:

plugins: [
  {
    resolve: "gatsby-plugin-netlify-cache",
    options: {
      extraDirsToCache: [
        "extraDir",
        ".extraDotDir",
        "extra/dir"
      ]
    }
  }
]

Note: the directory path is relative to the project root directory

More Repositories

1

sqip

"SQIP" (pronounced \skwɪb\ like the non-magical folk of magical descent) is a SVG-based LQIP technique.
TypeScript
3,370
star
2

mdx-live-editor

Online demo here:
JavaScript
58
star
3

metalsmith-webpack-suite

⛓️ Working example of metalsmith and webpack 3
JavaScript
30
star
4

gatsby-plugin-webpack-size

Implements CI friendly bundle size logging for your production builds
JavaScript
18
star
5

gatsby-transformer-inline-svg

Read and optimize SVG file nodes to render them inline in your website.
JavaScript
12
star
6

metalsmith-sharp

Flexible sharp integration for Metalsmith.
JavaScript
10
star
7

metalsmith-adaptive-images

DEPRECATED: A plugin for Metalsmith to create adaptive images via srcset and styles properties
JavaScript
9
star
8

gh-pages-boilerplate

This is a slim boilerplate for small sites and projects which will be hosted on github.io
JavaScript
9
star
9

block_attributes

(Simple) D8 port of the block_attributes module. (https://www.drupal.org/project/block_attributes)
PHP
7
star
10

configuration-vault

My personal vault for configuration files. Has a fancy interactive cli based installer to install all apps you need after formatting with ease.
JavaScript
6
star
11

gatsby-starter-collaborative-app

[WIP] Gatsby starter app with authentication and collaborative editing
JavaScript
5
star
12

responsive-svg-sprites

🚀 📐 Demonstration, example code and workflow blueprint for cross browser compatible responsive svg sprites
JavaScript
5
star
13

7dtd-prefab-tools

TypeScript
3
star
14

expanded_menu_block

Provides a new block type for menus with an option to expand all menu items for Drupal 8. Temporary port of menu_block to get some of its functionality.
PHP
3
star
15

redux-storage-engine-jsurl

jsurl engine for redux-store. Store your state in the url hash.
JavaScript
3
star
16

sane-config

☯️ sane, simple but opinionated cascading configuration management
JavaScript
2
star
17

embedded-svg-loading-impact-research

HTML
2
star
18

demo-sqip-artistic

Demo of an artistic SQIP approach based on the using-sqip example of Gatsby
CSS
2
star
19

responsive_svg

Provides a twig filter for rendering SVG stacks with cross-browser responsive resizing for Drupal 8.
PHP
2
star
20

lint-changed-files

Small CLI which detects changed files compared to your git remote (upsteam) and passes only these to eslint.
JavaScript
1
star
21

drupal-svg-methods

This repository generates SVG sprites with several different techniques.
JavaScript
1
star
22

managr

This project is discontinued - Demo:
JavaScript
1
star
23

gatsby-plugin-html-payload-size

Show and analyzes your initial HTML payloads. Warns you if your HTML files get to big.
JavaScript
1
star
24

iterm-colors-japanesque-readable

My personally improved version of the Japanesque iTerm2 colorscheme
1
star
25

gatsby-plugin-sftp-cache

JavaScript
1
star
26

demo-sqip-blog

Demo of SQIP based on gatsby-contentful-starter
JavaScript
1
star
27

loripsum-chrome-extension

A chrome context menu integration for the loripsum.net api.
JavaScript
1
star