Rebuilds the caches with given producers..
338616
private void rebuildProducerCache(Collection<IStatsProducer> producers){
		log.debug("Rebuilding producer cache with "+producers.size()+" producers.");
		log.debug("Following producers known: "+producers);

        synchronized(cacheLock){
			//lets create lists with more place to store as actually need, we will probably need it.
			final int approxSize = (int)(producers.size()*1.5);

            _cachedProducerList = new ArrayList<ProducerReference>(approxSize);
            _cachedProducerMap = new HashMap<String,ProducerReference>(approxSize);

            for (IStatsProducer sp : producers){
				final ProducerReference reference = new ProducerReference(sp);

                _cachedProducerList.add(reference);
                _cachedProducerMap.put(sp.getProducerId(), reference);
            }
		}

		if (log.isDebugEnabled()){
			log.debug("Cachedproducer list contains "+_cachedProducerList.size()+" producers: ");
			log.debug(String.valueOf(_cachedProducerList));
			log.debug("Cached producer map contains: "+_cachedProducerMap.size()+" producers");
			log.debug(String.valueOf(_cachedProducerMap));
		}
	}
526859
public function rebuild(): array
    {
        $redirects = [];
        $this->flush();
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_redirect');
        $queryBuilder->getRestrictions()->removeAll()
            ->add(GeneralUtility::makeInstance(HiddenRestriction::class))
            ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
        $statement = $queryBuilder
            ->select('*')
            ->from('sys_redirect')
            ->execute();
        while ($row = $statement->fetch()) {
            $host = $row['source_host'] ?: '*';
            if ($row['is_regexp']) {
                $redirects[$host]['regexp'][$row['source_path']][$row['uid']] = $row;
            } elseif ($row['respect_query_parameters']) {
                $redirects[$host]['respect_query_parameters'][$row['source_path']][$row['uid']] = $row;
            } else {
                $redirects[$host]['flat'][rtrim($row['source_path'], '/') . '/'][$row['uid']] = $row;
            }
        }
        $this->cache->set('redirects', $redirects, ['redirects']);
        return $redirects;
    }
258882
public void reset() {
        this.cacheHandler = null;
        this.pjp = null;
        this.cacheKey = null;
        this.cache = null;
        this.autoLoadTO = null;
        this.arguments = null;
        this.cacheWrapper = null;
    }
690676
private void actionWillProduce()
    {
        if (checker.checkProduction(current))
        {
            startProduction(current);
            state = ProducerState.PRODUCING;
        }
        else
        {
            for (final ProducerListener listener : listeners)
            {
                listener.notifyCanNotProduce(current);
            }
        }
    }
991571
public void cleanup() {
        ArrayList<ProducerReference> producerReferences = new ArrayList<ProducerReference>(registry.values());
        for (ProducerReference p : producerReferences) {
            try {
                if (p.get() != null)
                    unregisterProducer(p.get());
            } catch (Exception e) {
                LOGGER.warn("can't unregister producer " + p, e);
            }
        }
    }
1236882
public function rebuild()
    {
        if (file_exists($this->file)) {
            try {
                $this->data = unserialize(file_get_contents($this->file));
                return true;
            } catch (\Exception $e) {
                // Try just used to suppress the exception. If the cache is corrupted we just start from scratch.
            }
        }

        $this->data = [];
        $this->persist();
        return false;
    }
458428
def run(self):
        '''
        
        '''
        new_mins = list(salt.utils.minions.CkMinions(self.opts).connected_ids())
        cc = cache_cli(self.opts)
        cc.get_cached()
        cc.put_cache([new_mins])
        log.debug('ConCache CacheWorker update finished')
434409
def _build_cache():
    """"""
    sets = current_oaiserver.sets
    if sets is None:
        # build sets cache
        sets = current_oaiserver.sets = [
            oaiset.spec for oaiset in OAISet.query.filter(
                OAISet.search_pattern.is_(None)).all()]
    return sets
1062601
public void resetInsideClassCache() {
    final Map<Class<?>, Field[]> fieldz = cachedClasses;
    if (fieldz != null) {
      synchronized (fieldz) {
        fieldz.clear();
      }
    }
  }
351934
private void rebuildAlternates() {
    UnionTypeBuilder builder = UnionTypeBuilder.create(registry);
    builder.addAlternates(alternates);
    alternates = builder.getAlternates();
  }
1281629
public function rebuildCache()
    {
        $themes = $this->scanJsonFiles();
        // file_put_contents($this->cachePath, json_encode($themes, JSON_PRETTY_PRINT));

        $stub = file_get_contents(__DIR__ . '/stubs/cache.stub');
        $contents = str_replace('[CACHE]', var_export($themes, true), $stub);
        file_put_contents($this->cachePath, $contents);
    }
425993
protected void initCaches(int cacheSize) {

        m_offlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
        m_onlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
    }
270138
private void refreshMetadataCache(final Queue<WindupMetadataSystem> metadataSystemCache, final DecompilerSettings settings)
    {
        metadataSystemCache.clear();
        for (int i = 0; i < this.getNumberOfThreads(); i++)
        {
            metadataSystemCache.add(new NoRetryMetadataSystem(settings.getTypeLoader()));
        }
    }
995874
public void cache(Map<String, Object> resources) {
		verifyState();

		if (!cacheLocked.get()) {
			resourceCache.get().putAll(resources);
		}
	}
725871
public static void callOnIsPrefetchChanged(
      @Nullable List<ProducerContextCallbacks> callbacks) {
    if (callbacks == null) {
      return;
    }
    for (ProducerContextCallbacks callback : callbacks) {
      callback.onIsPrefetchChanged();
    }
  }
283332
function reloadSources(names) {

    names = u.isArray(names) ? names :
           names ? [names] :
           u.keys(opts.source$);

    var results = [];

    u.each(names, function(name) {
      var source = opts.source$[name];
      if (source) {
        source._reloadFromSource = true;
        results.push(name);
      } else {
        results.push(log('reloadSources unknown source ' + name));
      }
    });

    generator.reload(); // throttled
    return results;
  }
75718
@Override
	public void rebuildModifiedBundles() {
		List<JoinableResourceBundle> bundlesToRebuild = rsHandler.getBundlesToRebuild();
		for (JoinableResourceBundle bundle : bundlesToRebuild) {
			ResourceBundlePathsIterator bundlePaths = this.getBundlePaths(bundle.getId(), new NoCommentCallbackHandler(), Collections.EMPTY_MAP);
			
			while (bundlePaths.hasNext()){
				BundlePath bundlePath = bundlePaths.next();
				cacheMgr.remove(TEXT_CACHE_PREFIX + bundlePath.getPath());
				cacheMgr.remove(ZIP_CACHE_PREFIX + bundlePath.getPath());
			}
		}
		rsHandler.rebuildModifiedBundles();
	}