Sends the cache control header to the client
@see cacheControl
@since 1.1.12
420775
protected function sendCacheControlHeader()
	{
		if(Yii::app()->session->isStarted)
		{
			Yii::app()->session->setCacheLimiter('public');
			header('Pragma:',true);
		}
		header('Cache-Control: '.$this->cacheControl,true);
	}
125246
protected function send(): void
    {
        if (self::$overflowed || !self::$sendHeaders) {
            return;
        }

        if (!self::$initialized) {
            self::$initialized = true;

            self::$sendHeaders = $this->headersAccepted();
            if (!self::$sendHeaders) {
                return;
            }

            self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? '';
        }

        $json = @json_encode(self::$json);
        $data = base64_encode(utf8_encode($json));
        if (strlen($data) > 240 * 1024) {
            self::$overflowed = true;

            $record = [
                'message' => 'Incomplete logs, chrome header size limit reached',
                'context' => [],
                'level' => Logger::WARNING,
                'level_name' => Logger::getLevelName(Logger::WARNING),
                'channel' => 'monolog',
                'datetime' => new \DateTimeImmutable(),
                'extra' => [],
            ];
            self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record);
            $json = @json_encode(self::$json);
            $data = base64_encode(utf8_encode($json));
        }

        if (trim($data) !== '') {
            $this->sendHeader(static::HEADER_NAME, $data);
        }
    }
885655
protected function computeCacheControlValue()
    {
        if (!$this->cacheControl && !$this->has('ETag') && !$this->has('Last-Modified') && !$this->has('Expires')) {
            return 'no-cache, private';
        }

        if (!$this->cacheControl) {
            // conservative by default
            return 'private, must-revalidate';
        }

        $header = $this->getCacheControlHeader();
        if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) {
            return $header;
        }

        // public if s-maxage is defined, private otherwise
        if (!isset($this->cacheControl['s-maxage'])) {
            return $header.', private';
        }

        return $header;
    }
249457
protected void addNoCacheHeaders(HttpServletResponse response) {
		String cacheControlValue = response.getHeader(WebConstants.HEADER_CACHE_CONTROL);

		if (cacheControlValue != null && !cacheControlValue.isEmpty()) {
			cacheControlValue = cacheControlValue + ", " + WebConstants.CACHE_CONTROL_NO_STORE;
		} else {
			cacheControlValue = WebConstants.CACHE_CONTROL_NO_STORE;
		}

		response.setHeader(WebConstants.HEADER_CACHE_CONTROL, cacheControlValue);
		response.setHeader(WebConstants.HEADER_PRAGMA, WebConstants.PRAGMA_NO_CACHE);
	}
1248439
public function send()
    {
        $this->sendHeaders();
        $this->sendCookies();

        if (ResponseCode::canHaveBody($this->statusCode)) {
            $this->sendBody();
        }
    }
790576
public function getCacheControl()
    {
        $values = $this->_headers->get('Cache-Control', array());

        if (is_string($values)) {
            $values = explode(',', $values);
        }

        foreach ($values as $key => $value)
        {
            if(is_string($value))
            {
                $parts = explode('=', $value);

                if (count($parts) > 1)
                {
                    unset($values[$key]);
                    $values[trim($parts[0])] = trim($parts[1]);
                }
            }
        }

        return $values;
    }
765756
protected function parseCacheControl($header)
    {
        $cacheControl = [];
        \preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\s*(?:=(?:"([^"]*)"|([^ \t",;]*)))?#', $header, $matches, PREG_SET_ORDER);
        foreach ($matches as $match) {
            $cacheControl[\strtolower($match[1])] = $match[3] ?? ($match[2] ?? true);
        }

        return $cacheControl;
    }
1124565
public static function Send(){
            $oThis = self::CreateInstanceIfNotExists();
            
            if(is_object($oThis->oSmarty)){
                $oThis->CreateCacheCSS();
                $oThis->CreateCacheJS();
                
                Storage::AssignSmarty($oThis->oSmarty);
                Events::Call("BeforeSendingOutput");
                
                $oThis->oSmarty->display($oThis->sTemplateFilename);
            }
            else{
                $oThis = self::CreateInstanceIfNotExists();
                $oThis->CreateCacheCSS();
                $oThis->CreateCacheJS();
                $oThis->IncludeTemplate();
                $oThis->ReplaceVars();
                $oThis->RemoveUndefinedVars();
                $oThis->CheckConditions();
                //$oThis->ClearList();
                Events::Call("BeforeSendingOutput");

                @header('HTTP/1.1 200 OK');
                @header("Content-Type: text/html; charset=" . strtoupper(Storage::Get("app.charset", "UTF-8")), true);

                try{
                    //var_dump($oThis->sBuffer); die();
                    eval('?> ' . $oThis->sBuffer);
                    die();
                }
                catch(Exception $e){
                    die($e->getMessage());
                }
            }
        }
760192
function sendHeaders()
    {
        if ($this->isHeadersSent())
            throw new \Exception('Headers was sent.');

        
        \Poirot\Http\Response\httpResponseCode($this->getMessageObject()->getStatusCode());
        
        /** @var iHeader $header */
        foreach ($this->getMessageObject()->headers() as $header)
            header( $header->render() );

        $this->isHeadersSent = true;
        return $this;
    }
385894
public function getCacheControl() {
        if (!isset($this->metadata[OSSHeaders::CACHE_CONTROL])) {
            return null;
        }
        return $this->metadata[OSSHeaders::CACHE_CONTROL];
    }
258365
protected function _setCacheControl()
    {
        $control = '';
        foreach ($this->_cacheDirectives as $key => $val) {
            $control .= $val === true ? $key : sprintf('%s=%s', $key, $val);
            $control .= ', ';
        }
        $control = rtrim($control, ', ');
        $this->_setHeader('Cache-Control', $control);
    }
504006
public function sendCache()
    {
        if (!file_exists($this->pathHtmlCache.$this->name.'_cache.html')) {
            $this->cached = true;
            return $this;
        }

        $this->setContent(file_get_contents($this->pathHtmlCache.$this->name.'_cache.html'));
        $this->send();
    }
489897
public function getCacheControlInstance()
    {
        if ($this->cacheControl == null) {
            $this->cacheControl = new CacheControlImpl($this->getSiteInstance(), $this->getCurrentPageStrategyInstance());
        }
        return $this->cacheControl;
    }
170349
@Override
    public void configureWriteCache(long initDelay, long delayCache, long cacheSize){
        client.initTimer(initDelay, delayCache,cacheSize);
    }
1185613
public function sendHeaders()
	{
		if (!$this->checkHeadersSent())
		{
			foreach ($this->response->headers as $header)
			{
				if (strtolower($header['name']) == 'status')
				{
					// 'status' headers indicate an HTTP status, and need to be handled slightly differently
					$status = $this->getHttpStatusValue($header['value']);

					$this->header($status, true, (int) $header['value']);
				}
				else
				{
					$this->header($header['name'] . ': ' . $header['value']);
				}
			}
		}

		return $this;
	}
4749
protected void checkCacheControlHeaders(final Request request,
                                                   final HttpServletResponse servletResponse,
                                                   final FedoraResource resource,
                                                   final HttpSession session) {
        evaluateRequestPreconditions(request, servletResponse, resource, session, true);
        addCacheControlHeaders(servletResponse, resource, session);
    }
504055
public static function sendNoCacheHeaders()
    {
        if (false === headers_sent()) {
            header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
            header('Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT');
            header('Cache-Control: no-store, no-cache, must-revalidate');
            header('Cache-Control: post-check=0, pre-check=0', false);
            header('Pragma: no-cache');

            return true;
        }

        return false;
    }