19declare(strict_types=1);
52 $settings = new \ilGlobalCacheSettingsAdapter();
55 !isset(
$data[
"components"]) ||
56 !
$data[
"components"] ||
57 !isset(
$data[
"service"]) ||
58 $data[
"service"] ===
"none" ||
60 $data[
"service"] ===
"memcached" &&
61 (!isset(
$data[
"memcached_nodes"]) || count(
$data[
"memcached_nodes"]) === 0)
64 $settings->setActive(
false);
66 $settings->setActive(
true);
67 switch (
$data[
"service"]) {
70 $settings->setService(\
ILIAS\
Cache\Config::PHPSTATIC);
73 array_walk(
$data[
"memcached_nodes"],
function (array $node) use ($settings):
void {
74 $settings->addMemcachedNode($this->
convertNode($node));
76 $settings->setService(\
ILIAS\
Cache\Config::MEMCACHED);
79 $settings->setService(\
ILIAS\
Cache\Config::APCU);
82 throw new \InvalidArgumentException(
83 sprintf(
"Unknown caching service: '%s'",
$data[
"service"])
86 $settings->resetActivatedComponents();
87 if (
$data[
"components"] ===
"all") {
88 $settings->activateAll();
90 foreach (
$data[
"components"] as $cmp => $active) {
92 $settings->addActivatedComponent($cmp);
105 (
string) $node[
"host"],
107 (
int) $node[
"weight"]
162 'flushes all GlobalCaches.',
Builds a Color from either hex- or rgb values.
A non-objective, nothing to do to achieve it...
Signals that some goal won't be achievable by actions of the system ever.
hasConfig()
Does this agent require a configuration?
getStatusObjective(Storage $storage)
getMigrations()
@inheritDoc
__construct(protected Factory $refinery)
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.The provided configuration is to be used to change ...
getNamedObjectives(?Config $config=null)
Gets all named objectives The keys of the returned array are the commands.
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set acc...
A agent is some component that performs part of the setup process.
A configuration for the setup.
An objective is a desired state of the system that is supposed to be created by the setup.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.