protected function setCacheState($useCache)
    {
        if (is_bool($useCache)) {
            $this->useCache = $useCache;
        } else {
            // every invalid param would activate cache
            $this->useCache = true;
        }
    }
protected function setCacheState($useCache)
    {
        if (is_bool($useCache)) {
            $this->useCache = $useCache;
        } else {
            // every invalid param would activate cache
            $this->useCache = true;
        }
    }
protected function setCacheState ( $ useCache ) { if ( is_bool ( $ useCache ) ) { $ this -> useCache = $ useCache ; } else { // every invalid param would activate cache $ this -> useCache = true ; } }
Sets value if cache should be used or not

@param boolean $useCache the cache state

@return void
Sets value if cache should be used or not