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);
        }
    }