grunt-keycdn

Grunt plugin for interacting with the KeyCDN API


Keywords
cdn, content delivery network, keycdn, purge, gruntplugin, grunt
License
MIT
Install
npm install grunt-keycdn@0.0.4

Documentation

grunt-keycdn

Grunt plugin to interact with the KeyCDN API.

Usage

Purge Zone Cache

grunt.initConfig({
    keycdn: {
      purgeZone: {
        options: {
          apiKey: '{your_api_key}',
          zoneId: '{zone_id}',
          method: 'get'
        }
      },
    },
  });

Purge Selected URLs

grunt.initConfig({
    keycdn: {
      purgeURL: {
        options: {
          apiKey: '{your_api_key}',
          zoneId: '{zone_id}',
          method: 'del'
        },
        files: [
          { dest: 'demo-1.kxcdn.com/css/main.css' },
          { dest: 'demo-1.kxcdn.com/img/logo.png' }
        ],
      },
    },
  });

For more details visit https://www.keycdn.com