Get the cache control directives

@link https://tools.ietf.org/html/rfc7234#page-21

@return array
3207
protected function _getCacheControl()
    {
        $cache = array();
        $response = $this->getResponse();

        if($response->getUser()->isAuthentic()) {
            $cache = array('private');
        } else {
            $cache = array('public');
        }

        if(0 == $cache['max-age'] = $response->getMaxAge()) {
            $cache[] = 'no-cache';
        };

        return $cache;
    }
1090662
public static function getCacheStorageMethods()
    {
        $activeMethods = array();
        foreach (self::$storageMethods as $storageMethod) {
            $cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $storageMethod;
            if (call_user_func(array($cacheStorageClass, 'cacheMethodIsAvailable'))) {
                $activeMethods[] = $storageMethod;
            }
        }
        return $activeMethods;
    }
553076
public function getCacheControlDirective($key)
    {
        return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null;
    }
1181376
public function getDefinitionCache(): array
    {
        return [
            $this->name,
            $this->methods,
            $this->segments,
            $this->patterns,
            $this->handler,
            $this->format,
            $this->parameterNames,
        ];
    }
1222258
public function getCache()
    {
        if (!$this->cache) {
            $this->cache = new CacheStorageHelper(
                CacheStorageHelper::ADAPTOR_DATABASE,
                'Health',
                $this->em->getConnection()
            );
        }

        return [
            'delays'     => $this->cache->get('delays'),
            'lastCached' => $this->cache->get('lastCached'),
        ];
    }
298442
protected function getCacheDir()
    {
        $cacheDir = $this->container->getParameter("kernel.cache_dir");
        $cacheDir = rtrim($cacheDir, '/');
        $cacheDir .= '/' . self::FEED_CACHE_DIR . '/';

        return $cacheDir;
    }
1246390
public function findCached(): array
	{
		$output = [];
		$introspect = $this->introspection->introspect();
		$tags = $this->introspection->findTags(CachedDataSource::class);

		foreach ($tags as $tag) {
			foreach ($tag as $key => $value) {
				foreach ($introspect as $item) {
					if ($item->tags['services']['subreport'] === $value) {
						$output[] = [
							'id' => $item->rid . '.' . $item->sid,
							'report_id' => $item->rid,
							'subreport_id' => $item->sid,
							'report' => $item->tags['services']['report'],
							'subreport' => $item->tags['services']['subreport'],
							'key' => $item->tags['services']['subreport'],
							'cache' => $item->tags['cache'],
						];
					}
				}
			}
		}

		return $output;
	}
284609
public function getCaches()
    {
        if (!$this->caches) {
            foreach (Cache::getBins() as $name => $bin) {
                $this->caches[$name] = $bin;
            }
        }

        return $this->caches;
    }
205629
public function getFullDataSet () : array
    {
        if ($this->isUsingHandler()) :
            $this->regularize();
            $this->clearCache();

            return $this->_Cache = $this->_DataHandler->selectRangeEntitys(0,$this->_maxKey + 1);
        else :
            return $this->_Container;
        endif;
    }
1121353
protected function getCaches()
    {
        foreach ($this->caches as $key => $cache) {
            if (!$cache instanceof FlushableInterface) {
                $cache = $this->application->make($cache);
            }

            if ($cache instanceof FlushableInterface) {
                yield $key => $cache;
            }
        }
    }
544530
public function cacheKeys()
    {
        $keys = [];
        $roles = array_merge(cache('roles'), ['guest']);

        foreach ($roles as $role) {
            $keys[] = $this->generateCacheKey($role);
        }

        return implode('|', $keys);
    }
322237
protected function getCachedRoutes()
    {
        $ttl = (int)eZINI::instance( 'rest.ini' )->variable( 'CacheSettings', 'RouteApcCacheTTL' );

        if( self::$isRouteCacheCreated === false )
        {
            $options = array( 'ttl' => $ttl );
            ezcCacheManager::createCache( self::ROUTE_CACHE_ID, self::ROUTE_CACHE_PATH, 'ezpRestCacheStorageApcCluster', $options );
            self::$isRouteCacheCreated = true;
        }

        $cache = ezcCacheManager::getCache( self::ROUTE_CACHE_ID );
        $cacheKey = self::ROUTE_CACHE_KEY . '_' . ezpRestPrefixFilterInterface::getApiProviderName();
        if( ( $prefixedRoutes = $cache->restore( $cacheKey ) ) === false )
        {
            try
            {
                $prefixedRoutes = $this->doCreateRoutes();
                $cache->store( $cacheKey, $prefixedRoutes );
            }
            catch( Exception $e )
            {
                // Sometimes APC can miss a write. No big deal, just log it.
                // Cache will be regenerated next time
                ezpRestDebug::getInstance()->log( $e->getMessage(), ezcLog::ERROR );
            }
        }

        return $prefixedRoutes;
    }
1331283
protected function sectionRbac()
	{
		if (Yii::$app->authManager === null) return ['Status'=>'not configured'];
		$am = Yii::$app->authManager;

		//get roles and permission
		$roles = [];
		$perms = [];
		foreach ($am->roles as $role) $roles[] = $this->valueCode($role->name);
		foreach ($am->permissions as $perm) $perms[] = $this->valueCode($perm->name);

		//rbac cache config
		if ($am->cache === null) {
			$cacheConfig = Yii::$app->formatter->nullDisplay;
		} else {
			$cacheConfig = $this->valueModal('RBAC cache config', $this->valueVarDump($am->cache), 'Show');
		}

		return [
			'Auth manager'=>$this->valueCode($am->className()) . $this->valueModal($am->className(), $this->valueVarDump($am), 'Show config'),
			'Roles'=>implode(', ', $roles),
			'Permissions'=>implode(', ', $perms),
			'RBAC cache enabled'=>$this->valueBool($am->cache !== null),
			'RBAC cache config'=>$cacheConfig,
		];
	}
617618
protected function getIDListFromCache() : array
    {
        $arCacheTags = $this->getCacheTagList();
        $sCacheKey = $this->getCacheKey();

        $arElementIDList  = (array) CCache::get($arCacheTags, $sCacheKey);

        return $arElementIDList;
    }
937243
public function getSitemaps()
    {
        if (empty($this->sitemap)) {
            $this->log[] = self::DIRECTIVE_SITEMAP . ' directive: No sitemaps found';
        }
        return $this->sitemap;
    }
810170
public function getTrustedHeaders()
    {
        $trustedHeaders = Http::getConfig()->TrustedHeaders;

        return [
            'client_ip'    => $trustedHeaders->get('client_ip', self::HEADER_CLIENT_IP),
            'client_host'  => $trustedHeaders->get('client_host', self::HEADER_CLIENT_HOST),
            'client_proto' => $trustedHeaders->get('client_proto', self::HEADER_CLIENT_PROTO),
            'client_port'  => $trustedHeaders->get('client_port', self::HEADER_CLIENT_PORT),
        ];
    }
690222
private function getCacheFiles()
    {
        if (!($files = @scandir($this->directory, 1))) {
            return false;
        }

        $negExtLen = -1 * strlen($this->extension);
        $return = array();
        foreach ($files as $file) {
            if (substr($file, $negExtLen) === $this->extension) {
                $return[] = $this->directory . '/' . $file;
            }
        }
        return $return;
    }