1.1.1 • Published 4 years ago

cache-clear v1.1.1

Weekly downloads
158
License
MIT
Repository
github
Last release
4 years ago

Cache Clear

Clay Kiln Plugin to Clear Fastly Cache

Requirements

The Kiln project that is going to use this plugin should set the following environment variable:

FASTLY_API_KEY=cool-api-key

If FASTLY_API_KEY is not provided, the plugin will fall back to making unauthenticated HTTP requests with the PURGE method. This is a good option if using IP origin rules for allowing purges.

Getting Started

  1. Install the package as a dependency
npm install --save cache-clear
  1. Create a directory for your plugin inside the kiln/plugins directory in the services section
mkdir PROJECT_DIRECTORY/app/services/kiln/plugins/PLUGIN_NAME
  1. Create an index.js file in the previous directory created, importing main components for the plugin and setting them in the specific window.kiln object.
// index.js

const {
  NavButton,
  NavContent,
  CacheClearPlugin
} = require('cache-clear');

// Used to export components to the window element
module.exports = () => {
  window.kiln.navButtons['cache-clear'] = NavButton;
  window.kiln.navContent['cache-clear'] = NavContent;
  window.kiln.plugins['cache-clear'] = CacheClearPlugin;
};
  1. At app/services/kiln/index/js require the previously created file
require('./plugins/cache-clear')();
1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1-beta.0

5 years ago