Example #1
0
  clearCache: function(cacheDirName, tmpDir, callback) {
    if (typeof cacheDirName === "function") {
      callback = cacheDirName;
      cacheDirName = CACHE_DIR;
      tmpDir = CACHE_TMP_DIR;
    }

    var cache = new CacheSwap({ cacheDirName: cacheDirName, tmpDir: tmpDir });
    cache.clear(null, callback);
  },
Example #2
0
  clearCache: function (cacheDirName, tmpDir, callback) {
    if (typeof cacheDirName === 'function') {
      callback = cacheDirName
      cacheDirName = CACHE_DIR
      tmpDir = CACHE_TMP_DIR
    }

    var cache = new CacheSwap({cacheDirName: cacheDirName, tmpDir: tmpDir})
    cache.clear(null, callback)
  },
Example #3
0
cacheTask.clearAll = function (done) {
    done = done || _.noop;

    fileCache.clear(null, function (err) {
        if (err) {
            throw new PluginError('gulp-cache', 'Problem clearing the cache: ' + err.message);
        }

        done();
    });
};
Example #4
0
	return new Promise((resolve, reject) => {
		fileCache.clear(null, (err) => {

			if (err) {
				reject(new PluginError(
					'gulp-cache',
					`Problem clearing the cache: ${err.message}`
				));
				return;
			}

			resolve();
		});
	});
Example #5
0
cacheTask.clearAll = function(done) {
  fileCache.clear(null, function(err) {
    if (err) {
      var pluginError = new PluginError(
        'gulp-cache',
        'Problem clearing the cache: ' + err.message
      );

      if (done) {
        done(pluginError);
        return;
      }

      throw pluginError;
    }

    if (done) {
      done();
    }
  });
};
Example #6
0
gulp.task('clear', function (done) {
	fileCache.clear('default', done);
});