Loads and returns the cluster handler instance for the requested cache file.
The instance will be returned even if the file doesn't exist

@param $cacheID Cache file number. Will load the index if not provided.

@return eZClusterFileHandlerInterface
163349
protected static function loadCacheFile( $cacheID = 'index' )
    {
        if ( isset( self::$cacheFiles[$cacheID] ) )
        {
            return self::$cacheFiles[$cacheID];
        }

        $info = self::cacheInfo();
        $cacheFileName = $info['path'] . '_' . $cacheID . '.php';

        self::$cacheFiles[$cacheID] = eZClusterFileHandler::instance( $cacheFileName );
        return self::$cacheFiles[$cacheID];
    }
850283
private function getFromCacheable($cacheId)
    {
        $cacheable = $this->cachedItems[$cacheId]->cacheable;
        $data = $cacheable->data();
        $ttl = $cacheable->ttl();
        $this->storage->write($cacheId, $data, $ttl);
        return $data;
    }
648881
public function hasItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        try {
            return ($this->cache->countDataItems($cacheId) > 0);
        } catch (ezcBaseException $ex) {
            return false;
        }
    }
1078516
private function getFolderById(int $folderId): \stdClass
    {
        $folder = Craft::$app->assets->getFolderById($folderId);
        if ($folder) {
            $volume = $folder->getVolume();
            return  (object) [
                'id' => $folderId,
                'handle' => $volume->handle
            ];
        }
        return null;
    }
727951
private function getFile($fileId)
    {
        if (!$fileId) {
            return null;
        }

        $volumeManager = $this->getContainer()->get('phlexible_media_manager.volume_manager');
        $volume = $volumeManager->getByFileId($fileId);
        $file = $volume->findFile($fileId);

        return $file;
    }
376514
public function removeItem($cacheId)
    {
        $path = $this->keyPath($cacheId);

        if (!FileUtils::exists($path)) {
            return true;
        }

        return unlink($path);
    }
357266
public static function getFromCache($id)
    {
        $arrayCache = Configuration::getArrayCache();
        if ($arrayCache->contains($id)) {
            return $arrayCache->fetch($id);
        }

        $cacheDriver = Configuration::getCacheDriver();
        if ($cacheDriver !== null) {
            $cacheResult = $cacheDriver->fetch($id);
            if ($cacheResult !== false) {
                $arrayCache->save($id, $cacheResult);
                return $cacheResult;
            }
        }

        return null;
    }
996851
public static function _getFileNameForCacheId($cacheId)
    {
        $cacheId = str_replace('/', '_', base64_encode($cacheId));
        if (strlen($cacheId) > 50) {
            $cacheId = substr($cacheId, 0, 50).md5($cacheId);
        }
        return "cache/simple/".$cacheId;
    }
254699
public function coroutineUidIsOnline($uid)
    {
        if ($this->isCluster()) {
            return ProcessManager::getInstance()->getRpcCall(ClusterProcess::class)->isOnline($uid);
        } else {
            return $this->uid_fd_table->exist($uid);
        }
    }
1295203
public static function cache( int $id )
	{
		if( ! self::cacheIs($id) && $id === 0 )
		{
			$module = new ModuleCore();
			self::setCache(0, $module->setLoadedFromCache());
		}

		return self::defaultCache($id);
	}
1211725
private static function _getFileNameForCacheId($cacheId)
    {
        $cacheId = preg_replace('#[^a-zA-Z0-9_-]#', '_', $cacheId);
        if (strlen($cacheId) > 50) {
            $cacheId = substr($cacheId, 0, 50).md5($cacheId);
        }
        return "cache/view/".self::CACHE_VERSION.'-'.$cacheId;
    }
1013358
public function loadById($productId)
    {
        return $this->productRepository->getById($productId, false, $this->storeManager->getStore()->getId(), true);
    }
253534
public function get($documentId, $cache = true)
    {
        $rtn = $this->getCache($documentId);

        if (!$cache || !$rtn) {
            list($status, $doc) = $this->sendRequest(urlencode($documentId));

            if ($status == 200) {
                $rtn = $this->setCache($documentId, $doc);
            } else {
                $rtn = null;
            }
        }

        return $this->asDocs ? $this->toDocument($rtn) : $rtn;
    }
132432
public function getCacheFile($id)
    {
        assert('is_string($id)');

        $cacheFile = strval($this->cacheDirectory).'/'.$id;
        if (!file_exists($cacheFile)) {
            return null;
        }

        return $cacheFile;
    }
359526
private function loadTemplate($templateId)
    {
        $template = $this->templateFactory->create();
        $this->templateResource->load($template, $templateId);

        return $template;
    }
709409
public function removeItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        try {
            return ($this->cache->delete($cacheId));
        } catch (ezcBaseException $ex) {
            return false;
        }
    }
462950
public function setItem($cacheId, $content)
    {
        $cacheId = $this->normalizeKey($cacheId);

        try {
            return $this->cache->store($cacheId, serialize($content));
        } catch (ezcBaseException $ex) {
            return false;
        }
    }