Callback for "cache-clear" command
172801
public function cmdClearCache()
    {
        $id = $this->getParam(0);
        $all = $this->getParam('all');

        if (!isset($id) && empty($all)) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        $result = false;

        if (isset($id)) {
            $pattern = $this->getParam('pattern');
            if (isset($pattern)) {
                $result = $this->cache->clear($id, array('pattern' => $pattern));
            } else {
                $result = $this->cache->clear($id);
            }
        } else if ($all) {
            $result = $this->cache->clear(null);
        }

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->output();
    }
1352261
def clear(self):
        
        self.log(u"Clearing cache...")
        for file_handler, file_info in self.cache.values():
            self.log([u"  Removing file '%s'", file_info])
            gf.delete_file(file_handler, file_info)
        self._initialize_cache()
        self.log(u"Clearing cache... done")
814342
def clear_caches(self):
        """"""
        self.get_repository.cache_clear()
        self._get_repository.cache_clear()
        self.pool.clear_caches()
584838
function() {
            var s = Storage.storage();
            if (s == null) {
                return false;
            }
            Object.keys(s).forEach(function(key){
                if (key.indexOf("cache_") == 0 && key.indexOf("cache_"+configs.revision) ) {
                    s.removeItem(key);
                }
            });
        }
1049383
function clean (args, cb) {
  if (!cb) cb = args, args = []
  if (!args) args = []
  args = args.join("/").split("@").join("/")
  if (args.substr(-1) === "/") args = args.substr(0, args.length - 1)
  rm(path.join(npm.cache, path.normalize(args)), cb)
}
913365
def clear_cache(self):
        '''
        
        '''
        errors = []
        for rdir in (self.cache_root, self.file_list_cachedir):
            if os.path.exists(rdir):
                try:
                    shutil.rmtree(rdir)
                except OSError as exc:
                    errors.append(
                        'Unable to delete {0}: {1}'.format(rdir, exc)
                    )
        return errors
815726
@Override
  protected void clearCache() {
    if (lastX != null) lastX[0] = Double.NaN;
    if (lastXBatch != null) lastXBatch[0] = Double.NaN;
    if (lastVBatch != null) lastVBatch[0] = Double.NaN;
  }
530236
def clear_caches(self):
        
        for element_name in dir(self.components):
            element = getattr(self.components, element_name)
            if hasattr(element, 'cache_val'):
                delattr(element, 'cache_val')
1275032
def clear(self):
        """"""
        if self._cache is None:
            return _NO_RESULTS
        if self._cache is not None:
            with self._cache as k:
                res = [x.as_operation() for x in k.values()]
                k.clear()
                k.out_deque.clear()
                return res
704439
public function clear()
	{
		$cacheDir = PATH_APP . DS . 'cache';
		$files    = array('site.css', 'site.less.cache');

		// Remove each file
		foreach ($files as $file)
		{
			if (!is_file($cacheDir . DS . $file))
			{
				$this->output->addLine($file . ' does not exist', 'warning');
				continue;
			}

			if (!Filesystem::delete($cacheDir . DS . $file))
			{
				$this->output->addLine('Unable to delete cache file: ' . $file, 'error');
			}
			else
			{
				$this->output->addLine($file . ' deleted', 'success');
			}
		}

		// success!
		$this->output->addLine('All CSS cache files removed!', 'success');
	}
861627
def flush_cache(self, properties=None):
        
        if hasattr(self, '_cache'):
            if properties is None:
                del(self._cache)
            else:
                for prop in properties:
                    if prop in self._cache:
                        del(self._cache[prop])
213982
def cache_clear(self):
		""""""
		with self.cache_lock:
			cursor = self.cache_db.cursor()
			cursor.execute('DELETE FROM cache')
			self.cache_db.commit()
		self.logger.info('the RPC cache has been purged')
		return
925576
function flush(callback) {
    fs.writeFile(_this._filename, JSON.stringify(_this._cache), callback);
  }
1080435
def clear(self, key):
        # type: (Hashable) -> DataLoader
        
        cache_key = self.get_cache_key(key)
        self._promise_cache.pop(cache_key, None)
        return self
251867
public function clear_cache( $mode = 'all' ) {
		$mode = $mode ? : 'all';
		$cleared = Command::clear_cache( $mode );
		if ( $cleared ) {
			\WP_CLI::success("Cleared {$mode} cached contents");
		} else {
			\WP_CLI::warning("Failed to clear {$mode} cached contents");
		}
	}
1221333
def clean_all(self, args):
        """"""
        self.clean_dists(args)
        self.clean_builds(args)
        self.clean_download_cache(args)
1274379
def clean_cache(cached, **kwargs):
    "  "

    if isinstance(cached, basestring):
        cached = _str_to_model(cached)

    cache_key = generate_cache_key(cached, **kwargs)
    cache.delete(cache_key)