Test to see if the cache storage is available.

@return  boolean  True on success, false otherwise.
556899
public static function isAvailable()
	{
		$conf = new \Hubzero\Config\Repository('site');
		return is_writable($conf->get('cache_path', PATH_APP . DIRECTORY_SEPARATOR . 'cache'));
	}
418931
protected function loadCache()
    {

        if (empty($this->cacheListing)) return false;

        foreach ($this->cacheListing as $key => $entry) {
            if (!$entry) {
                continue;
            }


            if (!($entry instanceof Entry)) {
                /** @var $entry Entry */
                unset($entry);
                continue;
            }

            /** @var $entry Entry */
            if (!$entry->getId()) {
                unset($this->cacheListing [$key]);
                continue;
            }

            // if there is no value or the time to live is exceeded
            // unset the index and if necessary allocated the memoryblock
            if (!$entry->getData() || ($entry->getTtl() !== self::TTL_UNLIMITED && $entry->getTtl() < time())) {
                if ($entry instanceof Entry) {
                    $entry->delete();
                }

                unset($this->cacheListing [$key]);
                continue;
            }

            $this->list [$key] = $entry->getData();
        }

        return true;
    }
984852
private function isCacheUpToDate()
    {
        if (!file_exists($this->cachedFile)) {
            return false;
        }

        $cacheTime = filemtime($this->cachedFile);
        $mTime     = $this->modificationTime();

        return $cacheTime == $mTime;
    }
1241110
private boolean checkCache() {
        if (this.cacheValid) {
            long now = System.nanoTime();
            if ((now - this.cacheExpiryTime) > 0) {
                this.cacheValid = false;
            }
        }
        return this.cacheValid;
    }
92285
private function hasRequestAvailable()
    {
        return (
            null !== $this->application
            && !$this->application->isClientSAPI()
            && $this->application->isStarted()
        );
    }
1186354
protected function canBeCached()
    {
        if ($this->getSecurityToken()->isEnabled()) {
            return false;
        }
        if ($this->FormMethod() !== 'GET') {
            return false;
        }

        // Don't cache if there are required fields, or some other complex validator
        $validator = $this->getValidator();
        if ($validator instanceof RequiredFields) {
            if (count($this->validator->getRequired())) {
                return false;
            }
        } else {
            return false;
        }
        return true;
    }
334812
private function _isCached() 
    {
        $filters = false;

        if ($this->cacheSettings) {
        
            if ($this->cache) {
                $filters = $this->cache->getCache();
            }
        }

        return $filters;
    }
781131
private function isCacheValid()
    {
        if (!$this->cacheFile->exists()) {
            return false;
        }

        $cachedConfigTimestamp = $this->cacheFile->getTimestamp();

        /** @var \Bolt\Filesystem\Filesystem $configFs */
        $configFs = $this->app['filesystem']->getFilesystem('config');

        $configFiles = [
            'config.yml',
            'config_local.yml',
            'contenttypes.yml',
            'extensions.yml',
            'menu.yml',
            'permissions.yml',
            'routing.yml',
            'taxonomy.yml',
        ];
        foreach ($configFiles as $configFile) {
            $timestamp = $configFs->has($configFile) ? $configFs->get($configFile)->getTimestamp() : 0;
            if ($timestamp > $cachedConfigTimestamp) {
                // The configuration file timestamp is *newer* than the cache file's … invalidate!
                $this->invalidateCache();

                return false;
            }
        }

        return true;
    }
29178
public function valid(): bool
    {
        if ($this->cacheFilesIterator === null) {
            $this->rewind();
        }
        return $this->cacheFilesIterator->valid();
    }
869648
function isCached()
    {
        $file = $this->cache_dir . '/' . base64_encode($_SERVER['REQUEST_URI']) . '.html';
        if (!file_exists($file))
        {
            return false;
        }
        elseif (filemtime($file) + $this->expire < time())
        {
            return false;
        }
        else
        {
            return true;
        }
    }
1078646
public function isEmpty()
    {
        $isEmpty = empty($this->storage);

        if ($isEmpty === false) {
            if ($this->length() == 1) {
                if (is_null($this->values()[0])) {
                    $isEmpty = true;
                }
            }
        }

        return $isEmpty;
    }
684260
protected function isExpired()
    {
        if (! $this->filesystem->exists($this->cached)) {
            return true;
        }

        $lastModified = $this->filesystem->lastModified($this->file->getPath());

        return $lastModified >= $this->filesystem->lastModified($this->cached);
    }
69348
public function has($key)
    {
        return $this->enabled && $this->filesystem->exists($this->cacheDir.$key);
    }
581203
public function enableCaching()
    {
        if (FileSystemHelper::folderExists($this->getCacheDir())) {
            $this->caching = true;
            return true;
        }
        return false;
    }
1078991
static function isNoCacheAdviced()
    {
        if ( !isset( $GLOBALS['eZSiteBasics'] ) )
            return false;
        $siteBasics = $GLOBALS['eZSiteBasics'];
        if ( !isset( $siteBasics['no-cache-adviced'] ) )
            return false;
        return $siteBasics['no-cache-adviced'];
    }
104754
protected function loadFromCacheCache(): bool
    {
        if (file_exists($this->cacheFileName())) {
            $content = @file_get_contents($this->cacheFileName());
            if ($content) {
                TypeRegistry::setTypeMapping(unserialize($content));

                return true;
            }
        }

        return false;
    }
817862
private function loadData(): bool
    {
        $cacheTime = $this->getMeta()->getCache();

        if ($cacheTime && $cached = Cache::get($this->key)) {
            $this->data = $cached;
            return true;
        }
        return false;
    }