Get the cache folder for the given entry.

@param $entryIdentifier

@return string
977297
protected function getCacheFilename(string $entryIdentifier): string
    {
        $urlParts = \parse_url($entryIdentifier);
        $parts = [
            $urlParts['scheme'],
            $urlParts['host'],
            isset($urlParts['port']) ? (int)$urlParts['port'] : ('https' === $urlParts['scheme'] ? 443 : 80),
        ];

        $path = \implode('/', $parts) . '/' . \trim($urlParts['path'], '/');
        $cacheFilename = GeneralUtility::getFileAbsFileName(self::CACHE_DIRECTORY . $path);
        $fileExtension = (string)PathUtility::pathinfo(PathUtility::basename($cacheFilename), PATHINFO_EXTENSION);
        if (empty($fileExtension) || !GeneralUtility::inList($this->configuration->get('fileTypes'), $fileExtension)) {
            $cacheFilename = \rtrim($cacheFilename, '/') . '/index.html';
        }

        return $cacheFilename;
    }
949989
public function searchOrigDir(File $cacheDir) {
        foreach ($this->autoDirPathMap as $entry_set) {
            $orig_dir = $entry_set[0];
            $cache_dir = $entry_set[1];
            if ($cacheDir->getAbsolutePath() === $cache_dir->getAbsolutePath()) {
                return $orig_dir;
            }
        }
        return null;
    }
331730
final public function getIdentifier($identifier = null)
	{
		if(isset($identifier)) {
		    $result = $this->__service_container->getIdentifier($identifier);
		} else {
		    $result = $this->__service_identifier; 
		}
	    
	    return $result;
	}
214267
protected function removeStaticFiles(string $entryIdentifier): bool
    {
        $fileName = $this->getCacheFilename($entryIdentifier);
        $dispatchArguments = [
            'entryIdentifier' => $entryIdentifier,
            'fileName' => $fileName,
            'files' => [
                PathUtility::pathinfo($fileName, PATHINFO_DIRNAME) . '/.htaccess',
            ],
        ];

        GeneralUtility::makeInstance(MetaGenerator::class)->remove($entryIdentifier, $fileName);

        $dispatched = $this->dispatch('removeStaticFiles', $dispatchArguments);
        $files = $dispatched['files'];
        $removeService = GeneralUtility::makeInstance(RemoveService::class);
        foreach ($files as $file) {
            if (false === $removeService->removeFile($file)) {
                return false;
            }
        }

        return true;
    }
441953
private function getHostForImageIdentifier($imageIdentifier) {
        $dec = ord(substr($imageIdentifier, -1));

        // If this is an old image identifier (32 character hex string),
        // maintain backwards compatibility
        if (preg_match('#^[a-f0-9]{32}$#', $imageIdentifier)) {
            $dec = hexdec($imageIdentifier[0] . $imageIdentifier[1]);
        }

        return $this->serverUrls[$dec % count($this->serverUrls)];
    }
275513
public function getDeliveryItemType($resultIdentifier)
    {
        $resultsViewerService = $this->getServiceLocator()->get(ResultsViewerService::SERVICE_ID);
        return $resultsViewerService->getDeliveryItemType($resultIdentifier);
    }
384692
public function has(string $entryIdentifier): bool
    {
        // exists returned true or false in phpredis versions < 4.0.0, now it returns the number of keys
        $existsResult = $this->redis->exists($this->buildKey('entry:' . $entryIdentifier));
        return $existsResult === true || $existsResult > 0;
    }
552687
public function parseIdentifier(ObjectIdentifier $identifier)
    {
        $package = ucfirst($identifier->package);
        $path    = StringInflector::implode($identifier->path);
        $file    = ucfirst($identifier->name);
        $class   = $path.$file;

        $info = array(
            'class'      => $class,
            'package'    => $package,
            'path'       => $path,
            'file'       => $file,
        );

        return $info;
    }
839825
public function getEntry($entryId) {
        list($entryId, $len) = $this->gotoEntry($entryId);
        if ($entryId === false) {
            return '';
        }
        return $this->getFile()->fread($len);
    }
1077594
protected function getCacheDir($user, $imageIdentifier) {
        $userPath = str_pad($user, 3, '0', STR_PAD_LEFT);
        return sprintf(
            '%s/%s/%s/%s/%s/%s/%s/%s/%s',
            $this->getPath(),
            $userPath[0],
            $userPath[1],
            $userPath[2],
            $user,
            $imageIdentifier[0],
            $imageIdentifier[1],
            $imageIdentifier[2],
            $imageIdentifier
        );
    }
296148
public function getMapping($contentTypeIdentifier, $fieldIdentifier)
    {
        $key = $contentTypeIdentifier . '.' . $fieldIdentifier;

        if (!isset($this->fieldMappings[$key])) {
            return false;
        }

        $identifier = explode('.', $this->fieldMappings[$key]);

        return array(
            'content' => $identifier[0],
            'field' => $identifier[1],
        );
    }
16214
public function get(string $entryIdentifier)
    {
        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058294);
        }

        $rawResult = $this->backend->get($entryIdentifier);
        if ($rawResult === false) {
            return false;
        }
        return ($this->useIgBinary === true) ? igbinary_unserialize($rawResult) : unserialize($rawResult);
    }
644351
protected function _locate(KObjectIdentifier $identifier, $fallback = true)
    {
        $class = $this->__registry->getClass($identifier);

        //If the class is FALSE we have tried to locate it already, do not locate it again.
        if($class !== false)
        {
            //Set loader basepath if we are locating inside an application
            if($this->isRegistered('object.bootstrapper'))
            {
                if($path = $this->getObject('object.bootstrapper')->getApplicationPath($identifier->domain)) {
                    $this->getClassLoader()->setBasePath($path);
                }
            }

            if(empty($class))
            {
                $class = $this->_locators[$identifier->getType()]->locate($identifier, $fallback);

                //If we are falling back set the class in the registry
                if($fallback)
                {
                    if(!$this->__registry->get($identifier) instanceof KObjectInterface) {
                        $this->__registry->setClass($identifier, $class);
                    }
                }
            }
        }

        return $class;
    }
1221787
public function generate(string $entryIdentifier, string $fileName, string $data)
    {
        if (!$this->checkAvailable()) {
            return;
        }
        $contentCompress = \brotli_compress($data);
        if ($contentCompress) {
            GeneralUtility::writeFile($fileName . '.br', $contentCompress);
        }
    }
1294506
public function locate($inputSourceIdentifier)
    {
        if (InputSources::isValidInputSource($inputSourceIdentifier)) {
            return $this->factory->{self::INPUT_SOURCE_FACTORY_METHOD_MAP[$inputSourceIdentifier]}();
        }
296027
public function searchCacheDir(File $origDir) {
        if (isset($this->autoDirPathMap[\md5($origDir->getAbsolutePath())])) {
            $entry = $this->autoDirPathMap[\md5($origDir->getAbsolutePath())];
            return $entry[1];
        } else {
            return null;
        }
    }
1311665
public static function getEntityIdentifier($identifier)
    {
        $identifier = AnService::getIdentifier($identifier);

        if (!$identifier->basepath) {
            $adapters = AnService::get('anahita:loader')->getAdapters();
            $basepath = pick($adapters[$identifier->type]->getBasePath(), ANPATH_BASE);
            $applications = array_flip(AnServiceIdentifier::getApplications());

            if (isset($applications[$basepath])) {
                $identifier->application = $applications[$basepath];
                $identifier->basepath = $basepath;
            }
        }

        return $identifier;
    }