Call Sentry's check method or load of cached value.

@return bool
547713
public function check()
    {
        if ($this->cache === null) {
            $this->cache = $this->sentry->check();
        }

        return $this->cache && $this->getUser();
    }
743159
public function check() {
        if ($this->_checkCsrf() == true) {
            switch ($this->request->logged) {
                case '*' :
                    return true;
                    break;

                case 'true' :
                    if ($this->_checkLogged()) {
                        if ($this->_checkRole()) {
                            return true;
                        }
                        else {
                            $t = new Template($this->_configFirewall['forbidden']['template'], 'gcsfirewall', 0);
                            foreach ($this->_configFirewall['forbidden']['variable'] as $val) {
                                if ($val['type'] == 'var') {
                                    $t->assign([$val['name'] => $val['value']]);
                                }
                                else {
                                    $t->assign([$val['name'] => $this->useLang($val['value'])]);
                                }
                            }
                            echo $t->show();

                            $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden', __FILE__, __LINE__, ERROR_FATAL);

                            return false;
                        }
                    }
                    else {
                        $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden because the user must be logged', __FILE__, __LINE__, ERROR_FATAL);
                        $url = Url::get($this->_configFirewall['login']['name'], $this->_configFirewall['login']['vars']);

                        if ($url != "") {
                            $this->response->header('Location: ' . $url);

                            return false;
                        }
                        else {
                            $this->addError('The firewall failed to redirect the user to the url ' . $url, __FILE__, __LINE__, ERROR_FATAL);

                            return false;
                        }
                    }
                    break;

                case 'false' :
                    if ($this->_checkLogged() == false) {
                        return true;
                    }
                    else {
                        $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden because the user mustn\'t be logged', __FILE__, __LINE__, ERROR_FATAL);
                        $url = Url::get($this->_configFirewall['default']['name'], $this->_configFirewall['default']['vars']);

                        if ($url != "") {
                            $this->response->header('Location:' . $url);
                        }
                        else {
                            $this->addError('The firewall failed to redirect the user to the url ' . $url, __FILE__, __LINE__, ERROR_FATAL);

                            return false;
                        }

                        return false;
                    }
                    break;
            }
        }
        else {
            $t = new Template($this->_configFirewall['csrf']['template'], 'gcsfirewall', 0);
            foreach ($this->_configFirewall['csrf']['variable'] as $val) {
                if ($val['type'] == 'var') {
                    $t->assign([$val['name'] => $val['value']]);
                }
                else {
                    $t->assign([$val['name'] => $this->useLang($val['value'])]);
                }
            }

            echo $t->show();
            $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden : CSRF error', __FILE__, __LINE__, ERROR_FATAL);

            return false;
        }

        return true;
    }
57802
static protected function check()
    {
        empty(self::$cachepath) && self::$cachepath = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR;
        self::$cachepath = rtrim(self::$cachepath, '/\\') . DIRECTORY_SEPARATOR;
        if (!is_dir(self::$cachepath) && !mkdir(self::$cachepath, 0755, true)) {
            return false;
        }
        return true;
    }
739366
protected function useCache()
    {
        // Should we use a cached version?
        if ($this->cache && $this->cacheExists()) {
            $this->templateOutput = $this->getCache();
            if ($this->templateOutput !== false) {
                return true;
            }
        }
        return false;
    }
330261
public function hasChange()
    {
        foreach ($this as $key => $value) {
            if ($this->isAdded || $this->isDeleted) {
                return true;
            }
        }

        return false;
    }
769545
protected function checkLoaded()
	{
		if ( ! $this->modified ) {
		//	$this->storage = json_decode(json_encode($this->read()), true);
			$this->storage  = $this->read();
			$this->modified = true;
		}
	}
967527
protected function checkLazyLoad()
    {
        if ($this->lazyLoadInitiated === true) {
            return;
        }

        $this->lazyLoad();
        $this->generateKeys();

        $this->lazyLoadInitiated = true;
    }
1214276
private function _cached_required()
    {
        $image_info = getimagesize($this->source_file);
        
        if (($this->url_params['w'] == $image_info[0]) and ($this->url_params['h'] == $image_info[1])) {
            $this->serve_default = TRUE;
            return FALSE;
        }
        
        return TRUE;
    }
344026
private function checkCacheContentEvent($check_status = true)
    {
        // Checks if a service cache-control exists
        if (null === $this->cache_content) {
            return false;
        }

        // Checks if the target event is not a main contentset
        if (
            $this->object instanceof ContentSet
            && true === is_array($this->object->getPages())
            && 0 < $this->object->getPages()->count()
        ) {
            return false;
        }

        return true === $check_status ? $this->validator->isValid('cache_status', $this->object) : true;
    }
1339389
private function isCached()
    {
        $filters = false;

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

        return $filters;
    }
468409
public static function check()
    {
        $collections = self::getCollection();

        $jsonLastError = json_last_error();

        return isset($jsonLastError) ? $collections[$jsonLastError] : $collections['default'];
    }
319052
public function useCache()
    {
        if (is_callable($this->get_cache_callback)
            && is_callable($this->set_cache_callback)
            && is_callable($this->delete_cache_callback)) {
            return true;
        }

        return false;
    }
405787
public function needCache(){
		// disabled from configs
		if($this->disabled){
			return false;
		}

		// is post request
		if(Yii::$app->request->isPost){
			return false;
		}

		// has request parameter `disallowHtmlCache`
		if(Yii::$app->request->get('disallowHtmlCache')){
			return false;
		}

		// checking for excluded actions
		$excluded_actions = isset($this->excluded_actions[$this->_controller->id]) ? $this->excluded_actions[$this->_controller->id] : array();
		if($excluded_actions && in_array($this->_action->id, $excluded_actions)){
			return false;
		}

		// Checking for excluded params
		$excluded_params = isset($this->excluded_params[$this->_controller->id]) ? $this->excluded_params[$this->_controller->id] : array();

		foreach($excluded_params as $param => $value){
			if(is_numeric($param)){
				$param = $value;
				$value = null;
			}
			elseif(!is_array($value)){
				$value = array($value);
			}

			if(!isset($this->_controller->{$param})){
				continue;
			}

			if(is_null($value) && $this->_controller->{$param}){
				return false;
			}
			elseif(!is_null($value) && in_array($this->_controller->{$param}, $value)){
				return false;
			}
		}

		return true;
	}
727109
public function isLoaded(): bool
    {
        return $this->getMethod() !== self::JOIN && $this->getMethod() !== self::LEFT_JOIN;
    }
1264200
public function check()
    {
        $returnValue = null;

        
        $name = $this->getName();
        $min = $this->getMin();
        $max = $this->getMax();
        $validity = null;
        $message = null;
        
        if (extension_loaded($name)){
            $current = $this->getValue();
            
            if (!empty($min) && !empty($max)){
                // Both min and max are specified.
                if (version_compare($current, $min, '>=') && version_compare($current, $max, '<=')){
                    $validity = common_configuration_Report::VALID;
                    $message = "PHP Extension '${name}' version (${current}) is between ${min} and ${max}.";
                }
                else{
                    $validity = common_configuration_Report::INVALID;
                    $message = "PHP Extension '${name}' version (${current}) is not between ${min} and ${max}.";
                }
            }
            else if (!empty($min) && empty($max)){
                // Only min is specified.
                if (version_compare($current, $min, '>=')){
                    $validity = common_configuration_Report::VALID;
                    $message = "PHP Extension '${name}' version (${current}) is greater or equal to ${min}.";
                }
                else{
                    $validity = common_configuration_Report::INVALID;
                    $message = "PHP Extension '${name}' version (${current}) is lesser than ${min}.";
                }
            }
            else if (empty($min) && !empty($max)){
                // Only max is specified.
                if (version_compare($current, $max, '<=')){
                    $validity = common_configuration_Report::VALID;
                    $message = "PHP Extension '${name}' version (${current}) is lesser or equal to ${max}.";
                }
                else{
                    $validity = common_configuration_Report::INVALID;
                    $message = "PHP Extension '${name}' version (${current}) is greater than ${max}.";
                }
            }
            else{
                // No min and max are provided, we just check the
                // existence of the extension (already done).
                $validity = common_configuration_Report::VALID;
                $message = "PHP Extension '${name}' is loaded.";
            }
        }
        else{
            $validity = common_configuration_Report::UNKNOWN;
            $message = "PHP Extension '${name}' could not be found.";
        }

        $returnValue = new common_configuration_Report($validity, $message, $this);
        

        return $returnValue;
    }
136834
public function check()
	{
		if (is_null($this->user))
		{
			// Check session first, follow by cookie
			if ( ! $userArray = $this->session->get() and ! $userArray = $this->cookie->get())
			{
				return false;
			}

			// Now check our user is an array with two elements,
			// the username followed by the persist code
			if ( ! is_array($userArray) or count($userArray) !== 2)
			{
				return false;
			}

			list($id, $persistCode) = $userArray;

			// Let's find our user
			try
			{
				$user = $this->getUserProvider()->findById($id);
			}
			catch (UserNotFoundException $e)
			{
				return false;
			}

			// Great! Let's check the session's persist code
			// against the user. If it fails, somebody has tampered
			// with the cookie / session data and we're not allowing
			// a login
			if ( ! $user->checkPersistCode($persistCode))
			{
				return false;
			}

			// Now we'll set the user property on Sentry
			$this->user = $user;
		}

		// Let's check our cached user is indeed activated
		if ( ! $user = $this->getUser() or ! $user->isActivated())
		{
			return false;
		}
		// If throttling is enabled we check it's status
		if( $this->getThrottleProvider()->isEnabled())
		{
			// Check the throttle status
			$throttle = $this->getThrottleProvider()->findByUser( $user );

			if( $throttle->isBanned() or $throttle->isSuspended())
			{
				$this->logout();
				return false;
			}
		}

		return true;
	}
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;
    }