Lazy-load the precompile list so we don't cause asset compilation at app
 boot time, but ensure we cache the list so we don't recompute it for each
 request or test case.
491913
def precompiled_assets(clear_cache = false)
      @precompiled_assets = nil if clear_cache
      @precompiled_assets ||= assets_manifest.find(config.assets.precompile).map(&:logical_path).to_set
    end
350453
public function reloadBlacklist()
    {
        $this->cache->flush($this->getCacheKey());

        $this->blackListRegex = null;

        $this->loadBlacklist();
    }
907008
private void prepareForReuse(boolean reuse)
    {
        if(reuse)
        {
            // using clone to avoid ConcurentModificationException
            Iterator iter = ((List) mvOrderOfIds.clone()).iterator();
            while(iter.hasNext())
            {
                ObjectEnvelope mod = (ObjectEnvelope) mhtObjectEnvelopes.get(iter.next());
                if(!needsCommit || (mod.getModificationState() == StateOldClean.getInstance()
                        || mod.getModificationState().isTransient()))
                {
                    // nothing to do
                }
                else
                {
                    mod.setModificationState(mod.getModificationState().markClean());
                }
            }
        }
    }
409774
private synchronized void clearCaches() {
        fileListMap.clear();
        includeNonPatterns.clear();
        excludeNonPatterns.clear();
        includePatterns = null;
        excludePatterns = null;
        areNonPatternSetsReady = false;
    }
635539
def eager_load(assoc)
      relation = assoc.prepare(self)

      if assoc.override?
        relation.(assoc)
      else
        relation.preload_assoc(assoc)
      end
    end
789608
private function prepareBuilder(): void
    {
        if (!file_exists($this->getReportCacheDir())) {
            @mkdir($this->getReportCacheDir(), 0777, true);
        }

        $this->builder
             ->setCacheDir($this->getReportCacheDir())
             ->initialise();

        return;
    }
701101
def dont_cache():
    
    def decorate_func(func):
        @wraps(func)
        def decorate_func_call(*a, **kw):
            callback = SetCacheControlHeadersForNoCachingCallback()
            registry_provider = AfterThisRequestCallbackRegistryProvider()
            registry = registry_provider.provide()
            registry.add(callback)
            return func(*a, **kw)
        return decorate_func_call
    return decorate_func
425993
protected void initCaches(int cacheSize) {

        m_offlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
        m_onlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
    }
367478
function(app) {
  if (!appCache.good) {
    appCache.good = [];
  }
  if (!existsInCache(app, appCache.good)) {
    appCache.good.push(app);
  }
}
1324130
function (asset, result) {
                var checksum;
                result = Microloader.parseResult(result);
                Microloader.remainingCachedAssets--;

                if (!result.error) {
                    checksum = Microloader.checksum(result.content, asset.assetConfig.hash);
                    if (!checksum) {
                        _warn("Cached Asset '" + asset.assetConfig.path + "' has failed checksum. This asset will be uncached for future loading");

                        // Un cache this asset so it is loaded next time
                        asset.uncache();
                    }

                    //<debug>
                        _debug("Checksum for Cached Asset: " + asset.assetConfig.path + " is " + checksum);
                    //</debug>
                    Boot.registerContent(asset.assetConfig.path, asset.type, result.content);
                    asset.updateContent(result.content);
                    asset.cache();
                } else {
                    _warn("There was an error pre-loading the asset '" + asset.assetConfig.path + "'. This asset will be uncached for future loading");

                    // Un cache this asset so it is loaded next time
                    asset.uncache();
                }

                if (Microloader.remainingCachedAssets === 0) {
                    Microloader.onCachedAssetsReady();
                }
            }
798494
void hoistNoCompileFiles() {
    boolean staleInputs = false;
    maybeDoThreadedParsing();
    // Iterate a copy because hoisting modifies what we're iterating over.
    for (CompilerInput input : ImmutableList.copyOf(moduleGraph.getAllInputs())) {
      if (input.getHasNoCompileAnnotation()) {
        input.getModule().remove(input);
        staleInputs = true;
      }
    }

    if (staleInputs) {
      repartitionInputs();
    }
  }
499825
public void init() {
        isDirty = false;

        // If we haven't looked at anything from the cache or the filesystem, this is bootstrap time
        boolean firstInit = cachedFeatures.isEmpty();

        autoFeatures = new ArrayList<SubsystemFeatureDefinitionImpl>();
        knownFeatures = new HashMap<File, SubsystemFeatureDefinitionImpl>();
        knownBadFeatures = new HashMap<File, BadFeature>();

        // Read feature cache, this will only toss files that no longer exist
        // stale will be marked true if feature definitions were discarded.
        readCache(firstInit);

        // Now we need to go find / update the cache with anything new/interesting/different.
        // This will happen at most twice...
        readFeatureManifests();

        // If something was out of sync with the filesystem and this is the first pass,
        // reset the installed features list so we re-figure out what should be installed.
        if (isDirty && firstInit) {
            // If stale, reset to empty list as we'll be rebuilding....
            installedFeatures = Collections.emptySet();
            configuredFeatures = Collections.emptySet();
        }
    }
460723
private void lazyInit() {

    if (tokenToPosTagMap != null) {
      return;
    }

    Map<String, List<MultiWordEntry>> map = new HashMap<>();

    try (InputStream stream = JLanguageTool.getDataBroker().getFromResourceDirAsStream(filename)) {
      List<String> posTokens = loadWords(stream);

      for (String posToken : posTokens) {
        String[] tokenAndTag = posToken.split("\t");
        if (tokenAndTag.length != 2) {
          throw new RuntimeException("Invalid format in " + filename + ": '" + posToken + "', expected two tab-separated parts");
        }
        
        String[] tokens = tokenAndTag[0].split(" ");
        String posTag = tokenAndTag[1];
        
        List<MultiWordEntry> multiwordItems;
        if( map.containsKey(tokens[0]) ) {
          multiwordItems = map.get(tokens[0]);
        }
        else {
          multiwordItems = new ArrayList<>();
          map.put(tokens[0], multiwordItems);
        }
        
        multiwordItems.add(new MultiWordEntry(Arrays.asList(tokens), posTag));
      }
      
      tokenToPosTagMap = map;
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
164083
public function beforeCompile(): void
	{
		// Skip if it's not CLI mode
		if (!$this->cliMode) return;

		$builder = $this->getContainerBuilder();

		// Lookup for Symfony Console Application
		$application = $builder->getDefinitionByType('Symfony\Component\Console\Application');

		// Register helpers
		$connectionHelper = $this->prefix('@connectionHelper');
		$application->addSetup(new Statement('$service->getHelperSet()->set(?, ?)', [$connectionHelper, 'db']));
	}
336533
public <E extends Model> LazyList<E> load() {
        if (hydrated()) { throw new DBException("load() must be the last on the chain of methods"); }
        hydrate();
        return (LazyList<E>) this;
    }
403962
private void loadDynamicJavaRegisteredServices() {
        Map<Package,Map<String,String>> packagedJava = new HashMap<>();
        try {
            for (Asset javaAsset : AssetCache.getAssets(Asset.JAVA)) {
                // process RegisteredService-annotated classes
                if (javaAsset.getStringContent().indexOf("@RegisteredService") > 0 ||
                        javaAsset.getStringContent().indexOf("@Monitor") > 0 ||
                        javaAsset.getStringContent().indexOf("@Path") > 0 ||
                        javaAsset.getStringContent().indexOf("@Api") > 0 ||
                        javaAsset.getStringContent().indexOf("@ScheduledJob") > 0) {
                    String className = JavaNaming.getValidClassName(javaAsset.getName());
                    Package javaAssetPackage = PackageCache.getAssetPackage(javaAsset.getId());
                    if (javaAssetPackage == null) {
                        logger.severe("Omitting unpackaged Registered Service from compilation: " + javaAsset.getLabel());
                    }
                    else {
                        String qName = JavaNaming.getValidPackageName(javaAssetPackage.getName()) + "." + className;
                        Map<String,String> javaSources = packagedJava.get(javaAssetPackage);
                        if (javaSources == null) {
                            javaSources = new HashMap<>();
                            packagedJava.put(javaAssetPackage, javaSources);
                        }
                        javaSources.put(qName, javaAsset.getStringContent());
                    }
                }
            }
        }
        catch (Exception ex) {
            logger.severeException(ex.getMessage(), ex);
        }

        if (!packagedJava.isEmpty()) {
            for (Package pkg : packagedJava.keySet()) {
                try {
                    List<Class<?>> classes = CompiledJavaCache.compileClasses(getClass().getClassLoader(), pkg, packagedJava.get(pkg), true);
                    for (Class<?> clazz : classes) {
                        RegisteredService registeredService = clazz.getAnnotation(RegisteredService.class);
                        if (registeredService == null) {
                            // jax-rs services, and swagger Apis
                            Path pathAnnotation = clazz.getAnnotation(Path.class);
                            if (pathAnnotation != null) {
                                String resourcePath = pathAnnotation.value() == null ? clazz.getPackage().getName() + "/" + clazz.getSimpleName() : pathAnnotation.value();
                                if (JsonService.class.isAssignableFrom(clazz)) {
                                    logger.info("JAX-RS JSON Service: " + resourcePath + " --> '" + clazz + "'");
                                    DynamicJavaServiceRegistry.addRegisteredService(JsonService.class.getName(), clazz.getName(), resourcePath);
                                }
                                if (XmlService.class.isAssignableFrom(clazz)) {
                                    logger.info("JAX-RS XML Service: " + resourcePath + " --> '" + clazz + "'");
                                    DynamicJavaServiceRegistry.addRegisteredService(XmlService.class.getName(), clazz.getName(), resourcePath);
                                }
                            }
                            // Monitor annotation
                            Monitor monitorAnnotation = clazz.getAnnotation(Monitor.class);
                            if (monitorAnnotation != null) {
                                logger.info("Monitor Service: " + monitorAnnotation.value() + " --> '" + clazz + "'");
                                String monitorCategory = monitorAnnotation.category().getName();
                                MonitorRegistry.getInstance().addDynamicService(monitorCategory, clazz.getName());
                            }
                            // ScheduledJob annotation
                            ScheduledJob scheduledJobAnnotation = clazz.getAnnotation(ScheduledJob.class);
                            if (scheduledJobAnnotation != null) {
                                logger.info("Scheduled Job: " + scheduledJobAnnotation.value() + " --> '" + clazz + "'");
                                DynamicJavaServiceRegistry.addRegisteredService(com.centurylink.mdw.model.monitor.ScheduledJob.class.getName(), clazz.getName());
                            }
                        }
                        else {
                            for (int i = 0; i < registeredService.value().length; i++) {
                                String serviceName = registeredService.value()[i].getName();
                                logger.info("@RegisteredService: " + serviceName + " Class: " + clazz);
                                DynamicJavaServiceRegistry.addRegisteredService(serviceName, clazz.getName());
                            }
                        }
                    }
                }
                catch (Exception ex) {
                  // let other packages continue to process
                  logger.severeException("Failed to process Dynamic Java services in package " + pkg.getLabel() + ": " + ex.getMessage(), ex);
                }
            }
        }
    }
1321194
function View_preloadTemplates(dir) {
            var list, name;
            if (this.isDir(dir)) {
                list = this.readDir(dir);
                while (true) {
                    name = list.shift();
                    if (!name) {
                        break;
                    }
                    this.preloadTemplates(di.normalizePath(dir + '/' + name));
                }

            } else if (this.isFile(dir) && this.suffix.test(dir)) {
                process.nextTick(function compileTemplateAsync() {
                    this.setPreloaded(dir, this.swig.compileFile(dir));
                }.bind(this));
            }
        }