Get an associative array of cache control directives

@return array
358532
public function getDirectives()
    {
        if ($this->directives === null) {
            $this->directives = array();
            foreach ($this->parseParams() as $collection) {
                foreach ($collection as $key => $value) {
                    $this->directives[$key] = $value === '' ? true : $value;
                }
            }
        }

        return $this->directives;
    }
1124431
public function prepare_to_cache() {
        return array(
            'class' => get_class($this),
            'id' => $this->id,
            'ctxid' => $this->context->id,
            'options' => $this->options,
            'readonly' => $this->readonly
        );
    }
167185
public function getCompilerPasses(): array
    {
        $mappingBagProvider = $this->getMappingBagProvider();

        return $mappingBagProvider instanceof MappingBagProvider
            ? array_merge(
                parent::getCompilerPasses(),
                [new MappingCompilerPass($mappingBagProvider)]
            )
            : parent::getCompilerPasses();
    }
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;
	}
555131
public function getAttributes()
    {
        if (config('modules.cache.enabled') === false) {
            return json_decode($this->getContents(), 1);
        }

        return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function () {
            return json_decode($this->getContents(), 1);
        });
    }
1202476
protected function _cacheFields()
    {
        $c = $this->getParam('cache');
        $out = $c['fields'];

        if (!$this->_capability()->isEnabled('CONDSTORE')) {
            unset($out[Horde_Imap_Client::FETCH_FLAGS]);
        }

        return $out;
    }
1358761
private function getConfigPermissions()
    {
        if (null === $this->cacheConfigPermissions) {
            $sps = $this->provider->getConfigPermissions();
            $this->cacheConfigPermissions = [];

            foreach ($sps as $sp) {
                $classAction = PermissionUtils::getMapAction($sp->getClass());
                $fieldAction = PermissionUtils::getMapAction($sp->getField());
                $this->cacheConfigPermissions[$classAction][$fieldAction][$sp->getOperation()] = $sp;
            }
        }

        return $this->cacheConfigPermissions;
    }
88239
protected function getHttpHeaders()
    {
        $headers = [];
        if (null !== $this->_maxage) {
            $headers['Cache-Control'] = 'max-age=' . $this->_maxage;
        }
        if ($this->_gzipped) {
            $headers['Content-Encoding'] = 'gzip';
        }

        return $headers;
    }
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;
    }
1254796
private function getTableCache()
	{
		return $this->getCache()->load($this->getTableName(), function (&$dependencies) {
			return parent::getAllItems($this->assocBy);
		});
	}
532625
protected function getIDListFromCache() : array
    {
        $arElementIDList = parent::getIDListFromCache();

        //Get active product list
        $arActiveProductIDList = ProductListStore::instance()->active->get();
        if (empty($arActiveProductIDList) || empty($arElementIDList)) {
            return [];
        }

        $arResult = [];
        foreach ($arElementIDList as $iProductID => $iBrandID) {
            if (!in_array($iProductID, $arActiveProductIDList)) {
                continue;
            }

            $arResult[] = $iBrandID;
        }

        $arResult = array_unique($arResult);

        return $arResult;
    }
99165
public function getDirtyRawAttributes(): array
    {
        $attributes = $this->getRawAttributes();

        $cachedAttributes = $this->getCachedRawAttributes(array_keys($attributes));

        $dirty = [];

        foreach ($attributes as $key => $value) {
            if ($this->isActualRelation($key) || $key == 'pivot') {
                continue;
            }

            if (!array_key_exists($key, $cachedAttributes) && !$value instanceof Pivot) {
                $dirty[$key] = $value;
            } elseif ($value !== $cachedAttributes[$key] &&
                !$this->originalIsNumericallyEquivalent($value, $cachedAttributes[$key])) {
                $dirty[$key] = $value;
            }
        }

        return $dirty;
    }
521257
public function getTemplateAccessors() {
		if($this->templateAccessors) return $this->templateAccessors;

		$vars = parent::getTemplateAccessors();

		return $this->templateAccessors = array_merge($vars, array (
			'To',
			'Cc',
			'Bcc',
			'From',
			'Subject',
			'Body',
			'BaseURL',
			'IsEmail'
		));
	}
595241
protected function getRawIncludeMap(): array
    {
        $map = [];

        foreach ($this->includes as $includeKey => $definition) {
            if (\is_int($includeKey)) {
                $includeKey = $definition;
                $definition = null;
            }

            $settings = [];
            if (!empty($definition)) {
                $parts = preg_split('/\s*\|\s*/', $definition);
                foreach ($parts as $part) {
                    if (!preg_match('/^([^:]+)(:(.+))?$/', $part, $match)) {
                        throw new ParseDefinitionException("Unable to parse field definition for '{$includeKey}''");
                    }
                    // If only list() was viable ...
                    $directive = $match[1];
                    $val = $match[3] ?? null;
                    switch ($directive) {
                        case 'default':
                            $settings['default'] = true;
                            break;
                        case 'relation':
                            $settings['relation'] = !empty($val) ?
                                preg_split('/s*,\s*/', $val) : [$includeKey];
                            break;
                        case 'method':
                            if (!empty($val)) {
                                $settings['method'] = $val;
                            }
                            break;
                        case 'item':
                            $settings['resource_type'] = 'item';
                            break;
                        case 'collection':
                            $settings['resource_type'] = 'collection';
                            break;
                        default:
                            throw new ParseDefinitionException("Invalid key '{$directive}' for {$includeKey}");
                    }
                }
            }

            if (!isset($settings['relation'])) {
                $settings['relation'] = [];
            }
            if (!isset($settings['method'])) {
                $settings['method'] = 'include'.StrHelper::studlyCase($includeKey);
            }
            if (!isset($settings['default'])) {
                $settings['default'] = false;
            }
            if (!isset($settings['resource_type'])) {
                $settings['resource_type'] = null;
            }

            $map[$includeKey] = $settings;
        }

        return $map;
    }
653572
private static function caches()
    {
        $files = ['Driver', 'FileDriver', 'ArrayDriver', 'PhpFilesDriver', 'ApcDriver', 'PDODriver'];
        $folder = static::$root.'Caches/Drivers'.'/';

        self::call($files, $folder);

        $files = ['Item', 'Cache'];
        $folder = static::$root.'Caches'.'/';

        self::call($files, $folder);

        $files = ['CacheItemNotFoundException', 'DriverNotFoundException', 'DatabaseSurfaceDisabledException'];
        $folder = static::$root.'Caches/Exceptions'.'/';

        self::call($files, $folder);
    }
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;
            }
        }
    }
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,
		];
	}