index.js
function purgeCache(options) {
    return getZone(options.domain).then(function (zone) {
      let query = (options._[1]) ? {files: options._.slice(1)} : {purge_everything: true};
      return self.cloudflareClient.purgeCache(zone.id, query);
    }).then(function () {
      return new Result('Purged cache successfully');
    });
  }
function purgeCache(options) {
    return getZone(options.domain).then(function (zone) {
      let query = (options._[1]) ? {files: options._.slice(1)} : {purge_everything: true};
      return self.cloudflareClient.purgeCache(zone.id, query);
    }).then(function () {
      return new Result('Purged cache successfully');
    });
  }
function purgeCache ( options ) { return getZone ( options . domain ) . then ( function ( zone ) { let query = ( options . _ [ 1 ] ) ? { files : options . _ . slice ( 1 ) } : { purge_everything : true } ; return self . cloudflareClient . purgeCache ( zone . id , query ) ; } ) . then ( function ( ) { return new Result ( 'Purged cache successfully' ) ; } ) ; }
Purge files from cache
@param options
@returns {Promise}
Purge files from cache