public function isCacheActiveForTheCurrentUser(): bool
    {
        $active = true;

        // test the cache, with this GET-parameter
        if ($this->disableCacheGetParameter) {
            $testCache = isset($_GET[$this->disableCacheGetParameter]) ? (int) $_GET[$this->disableCacheGetParameter] : 0;
        } else {
            $testCache = 0;
        }

        if ($testCache !== 1) {
            if (
                // admin session is active
                (
                    $this->useCheckForAdminSession
                    &&
                    $this->isAdminSession
                )
                ||
                // server == client
                (
                    $this->useCheckForServerIpIsClientIp
                    &&
                    isset($_SERVER['SERVER_ADDR'])
                    &&
                    $_SERVER['SERVER_ADDR'] === $this->getClientIp()
                )
                ||
                // user is a dev
                (
                    $this->useCheckForDev
                    &&
                    $this->checkForDev()
                )
            ) {
                $active = false;
            }
        }

        return $active;
    }
public function isCacheActiveForTheCurrentUser(): bool
    {
        $active = true;

        // test the cache, with this GET-parameter
        if ($this->disableCacheGetParameter) {
            $testCache = isset($_GET[$this->disableCacheGetParameter]) ? (int) $_GET[$this->disableCacheGetParameter] : 0;
        } else {
            $testCache = 0;
        }

        if ($testCache !== 1) {
            if (
                // admin session is active
                (
                    $this->useCheckForAdminSession
                    &&
                    $this->isAdminSession
                )
                ||
                // server == client
                (
                    $this->useCheckForServerIpIsClientIp
                    &&
                    isset($_SERVER['SERVER_ADDR'])
                    &&
                    $_SERVER['SERVER_ADDR'] === $this->getClientIp()
                )
                ||
                // user is a dev
                (
                    $this->useCheckForDev
                    &&
                    $this->checkForDev()
                )
            ) {
                $active = false;
            }
        }

        return $active;
    }
public function isCacheActiveForTheCurrentUser ( ) : bool { $ active = true ; // test the cache, with this GET-parameter if ( $ this -> disableCacheGetParameter ) { $ testCache = isset ( $ _GET [ $ this -> disableCacheGetParameter ] ) ? ( int ) $ _GET [ $ this -> disableCacheGetParameter ] : 0 ; } else { $ testCache = 0 ; } if ( $ testCache !== 1 ) { if ( // admin session is active ( $ this -> useCheckForAdminSession && $ this -> isAdminSession ) || // server == client ( $ this -> useCheckForServerIpIsClientIp && isset ( $ _SERVER [ 'SERVER_ADDR' ] ) && $ _SERVER [ 'SERVER_ADDR' ] === $ this -> getClientIp ( ) ) || // user is a dev ( $ this -> useCheckForDev && $ this -> checkForDev ( ) ) ) { $ active = false ; } } return $ active ; }
check if the current use is a admin || dev || server == client

@return bool
check if the current use is a admin || dev || server == client