Get the file extension for the cache files

@return string
347432
protected function fileExtension()
    {
        if (!$this->fileExtension) {
            $mimeType = $this->serializer->mimeType();
            $this->fileExtension = $this->mimetypes->fileExtensions($mimeType)[0];
        };
        return $this->fileExtension;
    }
1361127
public function getCache() 
    {

        // make sure filters are parsed again if cache expired
        if (file_exists($this->path) && (time()-filectime($this->path)) < 
            $this->config['expiration_time']) {
            $data = unserialize(file_get_contents($this->path));
              return $data;
        }

        return false;
    }
743290
public function getCacheRoot(): string
    {
        return $this->getAppRoot().Constants::DS.$this->config[ConfigurationInterface::KEY_CACHE_ROOT];
    }
1266770
public function getCachePath() {
        $cachePath= false;
        if (!isset ($this->xpdo->config['cache_path'])) {
            while (true) {
                if (!empty ($_ENV['TMP'])) {
                    if ($cachePath= strtr($_ENV['TMP'], '\\', '/'))
                        break;
                }
                if (!empty ($_ENV['TMPDIR'])) {
                    if ($cachePath= strtr($_ENV['TMPDIR'], '\\', '/'))
                        break;
                }
                if (!empty ($_ENV['TEMP'])) {
                    if ($cachePath= strtr($_ENV['TEMP'], '\\', '/'))
                        break;
                }
                if ($temp_file= @ tempnam(md5(uniqid(rand(), true)), '')) {
                    $cachePath= strtr(dirname($temp_file), '\\', '/');
                    @ unlink($temp_file);
                }
                break;
            }
            if ($cachePath) {
                if ($cachePath{strlen($cachePath) - 1} != '/') $cachePath .= '/';
                $cachePath .= '.xpdo-cache';
            }
        }
        else {
            $cachePath= strtr($this->xpdo->config['cache_path'], '\\', '/');
        }
        if ($cachePath) {
            $perms = $this->getOption('new_folder_permissions', null, $this->getFolderPermissions());
            if (is_string($perms)) $perms = octdec($perms);
            if (@ $this->writeTree($cachePath, $perms)) {
                if ($cachePath{strlen($cachePath) - 1} != '/') $cachePath .= '/';
                if (!is_writeable($cachePath)) {
                    @ chmod($cachePath, $perms);
                }
            } else {
                $cachePath= false;
            }
        }
        return $cachePath;
    }
648218
public function getFilenameWithExtension() {
		if ($this->extension === null) {
			return $this->filename;
		}
		else {
			return $this->filename . '.' . $this->extension;
		}
	}
1207596
protected function cacheFile(string $key): string
    {
        return $this->path . '/' . $this->prefix . $key . $this->extension;
    }
485239
public function getFilename()
	{
		$filename = $this->getDisplayName();
		if ($this->getExtension() != '')
		{
			$filename .= '.' . $this->getExtension();
		}
		return $filename;
	}
238532
private function getCachePath()
    {
        if (!$this->files->isDirectory(storage_path("app/modules"))) {
            $this->files->makeDirectory(storage_path("app/modules"));
        }

        $location = str_slug($this->location);

        return storage_path("app/modules/$location.json");
    }
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;
    }
89207
public function getExtension()
    {
        if (is_null($this->extension) === true) {
            $filename = parent::getFilename();
            $str = new StringWrapper($filename);
            $this->extension = $str->getFirstEndMatch($this->predefinedExtensions);
            $this->hasPredefinedExt = true;

            if ($this->extension === '') {
                $this->hasPredefinedExt = false;
                $this->extension = parent::getExtension();
            }
        }

        return $this->extension;
    }
1274194
private function getPrefix()
    {
        $prefix = $this->getDiskConfig('prefix', '');
        $url = $this->getDiskConfig('url');

        if (! $prefix && ! $url) {
            return 'storage';
        }

        return $prefix;
    }
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));
    }
612380
private function getFullName()
    {
        $extension = $this->getExtension();
        return date('Y') . DIRECTORY_SEPARATOR . date('md') . DIRECTORY_SEPARATOR . date('Ymdhis') . rand(100, 999) . '.' . $extension;
    }
562439
public static function getCacheFolder()
  {
    $folder = self::path() . self::$cacheFolder;
    return rtrim(realpath($folder), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
  }
465727
public function getExtension()
	{
		if (!isset($this->extension))
		{
			$bits = explode('.', $this->getName());
			if (count($bits) > 1)
			{
				$this->extension = end($bits);
			}
			else
			{
				$this->extension = '';
			}
		}

		return $this->extension;
	}
282750
protected function getLangFiles()
    {
        if (static::$cache_lang_files) {
            return static::$cache_lang_files;
        }

        $locales = [];
        foreach ($this->getLangDirs() as $langPath) {
            $langFiles = scandir($langPath);
            foreach ($langFiles as $langFile) {
                $locale = pathinfo($langFile, PATHINFO_FILENAME);
                $ext = pathinfo($langFile, PATHINFO_EXTENSION);
                if ($locale && $ext === 'yml') {
                    $locales[$locale] = $locale;
                }
            }
        }
        ksort($locales);
        static::$cache_lang_files = $locales;
        return $locales;
    }
773538
public function getFileContents()
        {
            if ($this->fileContentsCache === null && $filePath = $this->getFile()) {

                // Return null if the file doesn't actually exist - this may
                // happen in cases where the filename is provided as, for
                // example, 'Unknown'
                if (!File::exists($filePath)) {
                    return null;
                }

                $this->fileContentsCache = File::read($filePath);
            }

            return $this->fileContentsCache;
        }