31 : void
32 {
33 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
34 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
35
36 if (!$client_ini || !$db) {
37 return;
38 }
39
40
41
42
43
45 $GLOBALS[
"DIC"] =
new DI\Container();
48
51
54 $storage->storeConfigText(
55 "service",
57 "The backend that is used for the ILIAS cache."
58 );
59 $storage->storeConfigBool(
60 "active",
62 );
63
65 if (
67 count($servers) > 0
68 ) {
69 $server_collection = [];
71 $active = new Setup\Metrics\Metric(
72 Setup\Metrics\Metric::STABILITY_CONFIG,
73 Setup\Metrics\Metric::TYPE_BOOL,
75 );
76 $host = new Setup\Metrics\Metric(
77 Setup\Metrics\Metric::STABILITY_CONFIG,
78 Setup\Metrics\Metric::TYPE_TEXT,
80 );
81 $port = new Setup\Metrics\Metric(
82 Setup\Metrics\Metric::STABILITY_CONFIG,
83 Setup\Metrics\Metric::TYPE_GAUGE,
85 );
86 $weight = new Setup\Metrics\Metric(
87 Setup\Metrics\Metric::STABILITY_CONFIG,
88 Setup\Metrics\Metric::TYPE_GAUGE,
90 );
91
92 $server_collection[] = new Setup\Metrics\Metric(
93 Setup\Metrics\Metric::STABILITY_CONFIG,
94 Setup\Metrics\Metric::TYPE_COLLECTION,
95 [
96 "active" => $active,
97 "host" => $host,
98 "port" => $port,
99 "weight" => $weight
100 ],
101 "Configured memcached node."
102 );
103 }
104
105 $nodes = new Setup\Metrics\Metric(
106 Setup\Metrics\Metric::STABILITY_CONFIG,
107 Setup\Metrics\Metric::TYPE_COLLECTION,
108 $server_collection,
109 "Collection of configured memcached nodes."
110 );
111 $storage->store("memcached_nodes", $nodes);
112 }
113
114 $component_activation = [];
116 $component_activation[$component] = new Setup\Metrics\Metric(
117 Setup\Metrics\Metric::STABILITY_CONFIG,
118 Setup\Metrics\Metric::TYPE_BOOL,
119 $settings->isComponentActivated($component)
120 );
121 }
122 $component_activation = new Setup\Metrics\Metric(
123 Setup\Metrics\Metric::STABILITY_CONFIG,
124 Setup\Metrics\Metric::TYPE_COLLECTION,
125 $component_activation,
126 "Which components are activated to use caching?"
127 );
128 $storage->store(
129 "components",
130 $component_activation
131 );
132
134 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Class ilGlobalCacheSettings.
static lookupServiceConfigName(int $service_type)
static getAvailableComponents()