19 declare(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.',
getInstallObjective(?Config $config=null)
__construct(protected Factory $refinery)
An objective is a desired state of the system that is supposed to be created by the setup...
getUpdateObjective(?Config $config=null)
Interface Observer Contains several chained tasks and infos about them.
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.if Config does not match the Agent...
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.if Agent has no Config ...
A agent is some component that performs part of the setup process.
A non-objective, nothing to do to achieve it...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Signals that some goal won't be achievable by actions of the system ever.
getStatusObjective(Storage $storage)
getNamedObjectives(?Config $config=null)
A configuration for the setup.
hasConfig()
Does this agent require a configuration?