Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

netlify-plugin-ttl-cache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-plugin-ttl-cache

A Netlify plugin for persisting immutable build assets across releases.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.7K
increased by7.79%
Maintainers
1
Weekly downloads
 
Created
Source

Netlify plugin TTL cache

A Netlify plugin for persisting immutable build assets across releases.

How it works

By default, Netlify replaces all existing static assets when publishing new releases.

For sites where assets are unique across deployments, and dynamically loaded (e.g. React.lazy) this can lead to runtime errors (e.g. chunk-load errors).

This plugin prevents this problem by allowing users to include legacy assets across releases.

Usage

Install the plugin

npm i -D netlify-plugin-ttl-cache

Add the plugin to your netlify.toml

[[plugins]]
package = "netlify-plugin-ttl-cache"
  [plugins.inputs]
  path = "build"
  ttl = 90

Inputs

path

Build output directory.

type: string

default: "build"

ttl

Maximum age (days) of files in cache.

type: number

default: 90

exclude

Regular expression string pattern for files to exclude.

type: string

default: n/a

Keywords

FAQs

Package last updated on 30 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc