Disable and invalidate the layer buid cache for migration
342622
def disablingBuidCache(self):
        '''
        
        '''
        self.buidcache = s_cache.LruDict(0)
        yield
        self.buidcache = s_cache.LruDict(BUID_CACHE_SIZE)
793829
def delete_migration(connection, basename):
    

    # Prepare query
    sql = "DELETE FROM migrations_applied WHERE name = %s"

    # Run
    with connection.cursor() as cursor:
        cursor.execute(sql, (basename,))
        connection.commit()

    return True
1034233
def rollback(self):
        """"""
        if not self._in_transaction:
            raise NotInTransaction
        self._init_cache()
        self._in_transaction = False
809099
public function forgetCache()
    {
        foreach (['url', 'js_url'] as $attribute) {
            $key = $attribute.'_'.$this->location;
            Cache::forget($key);
        }
    }
1285569
public function cacheFixtures()
    {
        $this->init();

        $this->migrations = $this->fetchMigrations();
        $this->fixtures   = $this->fetchFixtures();

        if ($this->useBackup && ! $this->hasBackup()) {
            $this->dropDatabase();
        }
    }
33542
def remove(self):
        
        body = request.body.read()
        indata = cjson.decode(body)
        try:
            indata = validateJSONInputNoCopy("migration_rqst", indata)
            return self.dbsMigrate.removeMigrationRequest(indata)
        except dbsException as he:
            dbsExceptionHandler(he.eCode, he.message, self.logger.exception, he.message)
        except Exception as e:
            if e.code == 400:
                dbsExceptionHandler('dbsException-invalid-input2', str(e), self.logger.exception, str(e))    
            else:
                dbsExceptionHandler('dbsException-server-error', dbsExceptionCode['dbsException-server-error'], self.logger.exception, str(e))
503603
public function invalidateCache()
    {
        $cache = Craft::$app->getCache();
        TagDependency::invalidate($cache, self::ROUTEMAP_CACHE_TAG);
        Craft::info(
            'Route Map cache cleared',
            __METHOD__
        );
    }
33456
public synchronized void invalidate()
	{
		// Remove this cached wrapper from the appropriate cache
        if (invalidated != true){
			if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
				logger.logp(Level.FINE, CLASS_NAME,"invalidate", "first invalidate");
			WebContainer.removeFromCache(cacheKeyStr);

			/* Avoid nulling things out so we can continue to handle requests in this wrapper
	                     * while the app is being destroyed
			cacheTarget = null;
			_servletPath = null;
			_pathInfo = null;
                        webapp = null;
			cacheKeyStr = null;
			*/
			invalidated = true;
		}
		else{
			if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
				logger.logp(Level.FINE, CLASS_NAME,"invalidate", "additional invalidate");
		}
	}
207679
def invalidate_all(self):
        ''''''

        LOG.debug('clearing cache')
        appcache = str(self.get_app_cache())
        for dirpath, dirnames, filenames in os.walk(appcache):
            for name in filenames:
                try:
                    pathlib.Path(dirpath, name).unlink()
                except OSError:
                    pass
396499
public function invalidate(){
		if(DEBUG_MODE){
			BDebug::message('[Memcached]: Delete key('.$key.')');
			}
		$mc=$this->getMemcached();
		if(empty($mc)){
			return false;
			}
		$mc->flush();
		}
335495
protected void common_invalidate(Object key) {
        ValidateUtility.objectNotNull(key, "key");
        cache.invalidateById(key, true);
    }
258502
public synchronized void clear() {
		_layerCache.clear();
		_moduleCache.clear();
		_gzipCache.clear();
		for (IGenericCache cache : _namedCaches.values()) {
			cache.clear();
		}
	}
499570
public static function invalidate()
    {
        $manager = self::getAuthManager();
        if ($manager->cache !== null) {
            TagDependency::invalidate($manager->cache, $manager->cacheTag);
        }
    }
140127
function LayeredTextureCache(renderer) {
  var self = this;
  var r = self.renderer = renderer;
  var cy = r.cy;
  self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ]

  self.firstGet = true;
  self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold;
  self.skipping = false;
  self.eleTxrDeqs = cy.collection();
  self.scheduleElementRefinement = util(function () {
    self.refineElementTextures(self.eleTxrDeqs);
    self.eleTxrDeqs.unmerge(self.eleTxrDeqs);
  }, refineEleDebounceTime);
  r.beforeRender(function (willDraw, now$$1) {
    if (now$$1 - self.lastInvalidationTime <= invalidThreshold) {
      self.skipping = true;
    } else {
      self.skipping = false;
    }
  }, r.beforeRenderPriorities.lyrTxrSkip);

  var qSort = function qSort(a, b) {
    return b.reqs - a.reqs;
  };

  self.layersQueue = new Heap(qSort);
  self.setupDequeueing();
}
909260
def clear( self ):
        
        self.setCurrentLayer(None)
        
        self._layers = []
        self._cache.clear()
        
        super(XNodeScene, self).clear()
965453
def flush_cache(self):
        '''
        
        '''
        logger.debug('Flushing cache {}'.format(self.db_path))
        with self.db:
            for rec in self._tups:
                self.db.execute("replace into history(agent_id, t_step, key, value) values (?, ?, ?, ?)", (rec.agent_id, rec.t_step, rec.key, rec.value))
        self._tups = list()
1329829
def unindex_layer(self, layer_id, use_cache=False):
    

    from hypermap.aggregator.models import Layer
    layer = Layer.objects.get(id=layer_id)

    if use_cache:
        LOGGER.debug('Caching layer with id %s for being removed from search engine' % layer.id)
        deleted_layers = cache.get('deleted_layers')
        if deleted_layers is None:
            deleted_layers = set([layer.id])
        else:
            deleted_layers.add(layer.id)
        cache.set('deleted_layers', deleted_layers)
        return

    if SEARCH_TYPE == 'solr':
        from hypermap.aggregator.solr import SolrHypermap
        LOGGER.debug('Removing layer %s from solr' % layer.id)
        try:
            solrobject = SolrHypermap()
            solrobject.remove_layer(layer.uuid)
        except Exception:
            LOGGER.error('Layer NOT correctly removed from Solr')
    elif SEARCH_TYPE == 'elasticsearch':
        # TODO implement me
        pass