protected function sendCacheControlHeader()
    {
        if ($this->sessionCacheLimiter !== null) {
            if ($this->sessionCacheLimiter === '' && !headers_sent() && Yii::getApp()->getSession()->getIsActive()) {
                header_remove('Expires');
                header_remove('Cache-Control');
                header_remove('Last-Modified');
                header_remove('Pragma');
            }

            Yii::getApp()->getSession()->setCacheLimiter($this->sessionCacheLimiter);
        }

        if ($this->cacheControlHeader !== null) {
            Yii::getApp()->getResponse()->setHeader('Cache-Control', $this->cacheControlHeader);
        }
    }
protected function sendCacheControlHeader()
    {
        if ($this->sessionCacheLimiter !== null) {
            if ($this->sessionCacheLimiter === '' && !headers_sent() && Yii::getApp()->getSession()->getIsActive()) {
                header_remove('Expires');
                header_remove('Cache-Control');
                header_remove('Last-Modified');
                header_remove('Pragma');
            }

            Yii::getApp()->getSession()->setCacheLimiter($this->sessionCacheLimiter);
        }

        if ($this->cacheControlHeader !== null) {
            Yii::getApp()->getResponse()->setHeader('Cache-Control', $this->cacheControlHeader);
        }
    }
protected function sendCacheControlHeader ( ) { if ( $ this -> sessionCacheLimiter !== null ) { if ( $ this -> sessionCacheLimiter === '' && ! headers_sent ( ) && Yii :: getApp ( ) -> getSession ( ) -> getIsActive ( ) ) { header_remove ( 'Expires' ) ; header_remove ( 'Cache-Control' ) ; header_remove ( 'Last-Modified' ) ; header_remove ( 'Pragma' ) ; } Yii :: getApp ( ) -> getSession ( ) -> setCacheLimiter ( $ this -> sessionCacheLimiter ) ; } if ( $ this -> cacheControlHeader !== null ) { Yii :: getApp ( ) -> getResponse ( ) -> setHeader ( 'Cache-Control' , $ this -> cacheControlHeader ) ; } }
Sends the cache control header to the client.
@see cacheControlHeader
Sends the cache control header to the client .