Remove deleted instances from cache
496445
public static function clearDeletedInstances() {
		if( !isset(static::$instances[static::getClass()]) ) {
			return;
		}
		$instances = &static::$instances[static::getClass()];
		foreach( $instances as $id => $obj ) {
			/* @var static $obj */
			if( $obj->isDeleted() ) {
				unset($instances[$id]);
			}
		}
	}
642478
function extractFromCache ( cache ) {

			var values = [];
			for ( var key in cache ) {

				var data = cache[ key ];
				delete data.metadata;
				values.push( data );

			}
			return values;

		}
1208269
def clean_blobstore_cache(self):
        """"""
        url = self.api_url + self.blobstores_builpack_cache_url
        resp, rcode = self.request('DELETE', url)
        if rcode != 202:
            raise CFException(resp, rcode)
        return resp
268936
def delete(self, instance):
        ''''''
        flushdb(self.client) if flushdb else self.client.flushdb()
382027
def DeleteInstance(r, instance, dry_run=False):
    

    return r.request("delete", "/2/instances/%s" % instance,
                     query={"dry-run": dry_run})
1020110
def clear_cache(ip=None):
    """"""
    if ip:
        with ignored(Exception):
            client = CLIENT_CACHE[ip]
            del CLIENT_CACHE[ip]
            client.close()
    else:
        for client in CLIENT_CACHE.values():
            with ignored(Exception):
                client.close()
        CLIENT_CACHE.clear()
802379
def clear_caches(delete_all=False):
    
    global _time_caches

    if delete_all:
        _time_caches = []
        _parser = { "default": CodeParser() }
    else:
        # normally just kill the expired entries, not all
        for tc in _time_caches:
            # check time_cache for expired entries
            for key, (t, value) in list(tc.items()):
                if t < time.time():
                    # delete expired entries
                    del tc[key]
705351
def clear_cache(self):
        """"""
        for cmd in (self.cat_file_all, self.cat_file_header):
            if cmd:
                cmd.__del__()

        self.cat_file_all = None
        self.cat_file_header = None
        return self
1008083
public function clear()
    {
        if (empty($this->store)) {
            throw new ClientError('Missing store instance to use for this operation.');
        }

        if (!empty($this->url)) {
            $this->store->delete($this->getKey($this->url));
        }

        $this->cached = false;
    }
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
717517
public void cacheCleared(DCache cache) {
        final String methodName = "cacheCleared()";
        ExpirationMetaData expirationMetaData = (ExpirationMetaData)cacheInstancesTable.get(cache);
        if (expirationMetaData == null) {
            return;
        }
        synchronized (expirationMetaData) {
            if (!expirationMetaData.expirationTable.isEmpty()) {
                Enumeration e = expirationMetaData.expirationTable.elements();
                while (e.hasMoreElements()) {
                    InvalidationTask it = (InvalidationTask)e.nextElement();
                    it.reset();
                    taskPool.add(it);
                }
                expirationMetaData.expirationTable.clear();
                expirationMetaData.timeLimitHeap.clear();
                if (tc.isDebugEnabled()){
                	Tr.debug(tc, methodName + cache.getCacheName() + " expirationTable=" + expirationMetaData.expirationTable.size());
                }
            }
        }
    }
100483
function removeCachedResult(removedLru) {
	var removedLruLen = removedLru.length,
		currentLru = removedLru[removedLruLen - 1],
		tmp,
		i;

	currentLru.cacheItem.delete(currentLru.arg);

	// walk down the tree removing dead branches (size 0) along the way
	for (i = removedLruLen - 2; i >= 0; i--) {
		currentLru = removedLru[i];
		tmp = currentLru.cacheItem.get(currentLru.arg);

		if (!tmp || !tmp.size) {
			currentLru.cacheItem.delete(currentLru.arg);
		} else {
			break;
		}
	}
}
1039458
function clearCache() {
  let deletedCount = 0;

  const iter = eventSourceMappingKeysByFunctionAndStream.entries();
  let next = iter.next();
  while (!next.done) {
    const [k, key] = next.value;

    const deleted = eventSourceMappingPromisesByKey.delete(key);
    eventSourceMappingKeysByFunctionAndStream.delete(k);

    if (deleted) {
      ++deletedCount;
    }

    next = iter.next();
  }

  return deletedCount;
}
1231563
def prune_cache(mtime=15)
      # get old, unused entries and discard from DB and filesystem
      entries = remove_old_items(mtime)
      entries.each do |key, entry|
        FileUtils.rm_f(entry[:file])
      end
    end
78077
private function deleteAllCache()
    {
        $a = array("dev", "prod");
        Output::displayAsSuccess("Hey, I delete cache for all environment", "none");
        for ($i = 0; $i < count($a); $i++) {
            $this->callDelCreaServer($a[$i]);
        }
        if (in_array("--noexit", $this->options["options"])) {
            Output::displayAsEndSuccess("Cache was deleted for all environment.", "none");
        } else {
            Output::displayAsNormal("Cache was deleted for all environment.");
        }
    }
1167197
def delete(self, cachedir=None, cfgstr=None, verbose=True or VERBOSE or util_arg.VERBOSE):
        
        fpath = self.get_fpath(cachedir, cfgstr=cfgstr)
        if verbose:
            print('[Cachable] cache delete: %r' % (basename(fpath),))
        os.remove(fpath)
852083
def pycache_clean(context):
    ""
    #pylint: disable=unused-argument
    dirs = set()
    for root, dirnames, _ in os.walk(os.curdir):
        if '__pycache__' in dirnames:
            dirs.add(os.path.join(root, '__pycache__'))
    print("Removing __pycache__ directories")
    rmrf(dirs, verbose=False)