Retrieve the asset files cache manager. Lazy loads an instance if none currently set.

@return \AssetsBundle\AssetFile\AssetFilesCacheManager
324983
public function getAssetFilesCacheManager()
    {
        if (!$this->assetFilesCacheManager instanceof \AssetsBundle\AssetFile\AssetFilesCacheManager) {
            $this->setAssetFilesCacheManager(new \AssetsBundle\AssetFile\AssetFilesCacheManager());
        }
        return $this->assetFilesCacheManager;
    }
1080973
protected function getCache(): PhpFileCache
    {
        if ($this->_cache === null)
            $this->_cache = new PhpFileCache($this->getCacheDir());

        return $this->_cache;
    }
687740
protected function retrieveBundleWebFolder()
    {
        $asset = $this->asset;
        
        $namespacesFile = $this->kernel->getRootDir() . '/../vendor/composer/autoload_namespaces.php';
        if (file_exists($namespacesFile)) {
            $map = require $namespacesFile;
            foreach ($map as $namespace => $paths) {
                if ( ! is_array($paths)) {
                    $paths = array($paths);
                }
                
                foreach($paths as $path) {
                    if (strpos($this->asset, $path) !== false) {
                        preg_match('/Bundle(.*)/', $this->asset, $matches);
                        $asset = str_replace("\\", "", $namespace) . $matches[1];
                        break;
                    }
                }
            }
        }

        preg_match('/([^@\/][\w]+Bundle)\/(Resources\/public)?\/(.*)/', $asset, $matches);
        if (!empty($matches) && count($matches) == 4) {
            return sprintf('bundles/%s/%s', preg_replace('/bundle$/', '', strtolower($matches[1])), $matches[3]);
        }

        preg_match('/[\/]?(bundles.*)/', strtolower($asset), $matches);
        if (!empty($matches)) {
            return $matches[1];
        }

        $asset = str_replace("@", "", strtolower($asset));
        $bundleDir = preg_replace('/bundle$/', '', $asset);

        return ($bundleDir !== $asset) ? 'bundles/' . $bundleDir : null;
    }
793173
public function getAsset($asset)
    {
        if (!isset($this->assetCache[$asset])) {
            $this->assetCache[$asset] = $this->assetRepository->createAsset($asset);
        }
        return $this->assetCache[$asset];
    }
344783
private function getCache()
    {
        $cachePath = $this->getCachePath();

        if (!$this->files->exists($cachePath)) {
            $this->createCache();

            $this->optimize();
        }

        return collect(json_decode($this->files->get($cachePath), true));
    }
195328
public function getAssetManager()
    {
        if (!is_object($this->_assetManager)) {
            $options = $this->_assetManager;
            if (empty($options['__class'])) {
                $options['__class'] = AssetManager::class;
            }
            if (!isset($options['basePath'])) {
                throw new Exception("Please specify 'basePath' for the 'assetManager' option.");
            }
            if (!isset($options['baseUrl'])) {
                throw new Exception("Please specify 'baseUrl' for the 'assetManager' option.");
            }

            if (!isset($options['forceCopy'])) {
                $options['forceCopy'] = true;
            }

            $this->_assetManager = $this->app->createObject($options);
        }

        return $this->_assetManager;
    }
1149942
public function getAssetsUrl(){
		if($this->_assetsUrl !== null){
			return $this->_assetsUrl;
		}

		$this->_assetsUrl = Yii::$app->getAssetManager()->publish(__DIR__);
		$this->_assetsUrl = $this->_assetsUrl[1];
		return $this->_assetsUrl;
	}
1144396
protected function cacheJsAssetFiles()
    {
        if ($this->getOptions()->isProduction()) {
            // Retrieve asset file filters manager
            $oAssetFileFiltersManager = $this->getAssetFileFiltersManager();

            // Retrieve Js asset file filter if available
            $oJsFileFilter = $oAssetFileFiltersManager->has(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) ? $oAssetFileFiltersManager->get(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) : null;

            // Create tmp asset file
            $oTmpAssetFile = $this->createTmpAssetFile(\AssetsBundle\AssetFile\AssetFile::ASSET_JS);

            foreach ($this->getAssetFilesConfiguration()->getAssetFiles(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) as $oAssetFile) {
                $sAssetFileContent = $oJsFileFilter ? $oJsFileFilter->filterAssetFile($oAssetFile) : $oAssetFile->getAssetFileContents();
                $oTmpAssetFile->setAssetFileContents($sAssetFileContent . PHP_EOL);
            }
            if($oTmpAssetFile->getAssetFileSize()){
                return array($this->getAssetFilesCacheManager()->cacheAssetFile($oTmpAssetFile));
            }
            return array();
        }

        // Retrieve asset files cache manager
        $oAssetFilesCacheManager = $this->getAssetFilesCacheManager();
        $aAssetFiles = array();
        foreach ($this->getAssetFilesConfiguration()->getAssetFiles(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) as $oAssetFile) {
            // Cache asset file if not empty
            if($oAssetFile->getAssetFileSize()){
                $aAssetFiles[] = $oAssetFilesCacheManager->cacheAssetFile($oAssetFile);
            }
        }
        return $aAssetFiles;
    }
630443
public function getCache()
    {
        if (!$this->cache) {
            $options = isset($this->options['cache']) ? $this->options['cache'] : [];
            foreach (static::defaultOptions()['cache'] as $k=>$v) {
                if (!isset($options[$k])) {
                    $options[$k] = $v;
                }
            }
            if (!file_exists($options['path'])) {
                $options['path'] = Config::getStoragePath() . trim($options['path'], '\\/');
            }
            
            $this->cache = new Cache($options); 
        }
        
        return $this->cache;
    }
1319804
public function getCacheDir() {
        if (is_null($this->__project_cache_dir)) {
            $this->__project_cache_dir = new File("." . uniqid(), $this->projectRootDir->getAbsolutePath());
        }
        return $this->__project_cache_dir;
    }
1166419
public function getCache()
    {
        $data = apc_fetch($this->config['key_prefix'] . '.storage');
        $this->isCached = !empty($data);

        return $data;
    }
1272085
protected function getCacheDirectory()
    {
        $cache_dir = false;

        if ($this->cacheDir && is_dir($this->cacheDir)) {
            $twig_cache = $this->cacheDir . self::CACHE_DIR;
            if (is_dir($twig_cache) && is_writable($twig_cache)) {
                $cache_dir = $twig_cache;
            } else {

                // Attempt to create twig cache dir
                $fs = new FileSystem();

                try {
                    $fs->mkdir($twig_cache);
                } catch (\Exception $e) {}

                $cache_dir = $twig_cache;
            }
        }

        return($cache_dir);
    }
421563
public function getLoader()
    {
        if (null === $this->loader) {
            $locator  = new FileLocator($this->paths);
            $resolver = new LoaderResolver(array(
                new YamlFileLoader($locator),
                new PhpFileLoader($locator),
                new IniFileLoader($locator),
                new ArrayLoader(),
            ));

            $this->loader = new DelegatingLoader($resolver);
        }

        return $this->loader;
    }
462289
public function getAssetBankManager()
    {
        if (!isset($this->assetBankManager)) {
            $this->assetBankManager = new AssetBankManager($this->requestHandler);
        }

        return $this->assetBankManager;
    }
617197
protected function getAssetVersions() {
        if (!$this->_assetVersions) {
            $this->_assetVersions = new AssetVersionList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sid']
            );
        }

        return $this->_assetVersions;
    }
103173
protected function cachedFile()
    {
        if (null === $this->cachedFile) {
            $this->cachedFile = rtrim($this->dir, '/') . '/' . ltrim($this->filename, '/');
        }

        return $this->cachedFile;
    }
598576
public function getFileManager()
    {
        if ($this->file_manager_instance === null) {
            $this->file_manager_instance = new FileManager($this);
        }

        return $this->file_manager_instance;
    }