17 : void
18 {
19 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
20 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
21
22 if (!$client_ini || !$db) {
23 return;
24 }
25
26
27
28
29
31 $GLOBALS[
"DIC"] =
new DI\Container();
33
35 $settings->readFromIniFile($client_ini);
36
37 $service_type = (int) $settings->getService();
39 $storage->storeConfigText(
40 "service",
42 "The backend that is used for the ILIAS cache."
43 );
44 $storage->storeConfigBool(
45 "active",
46 (bool) $settings->isActive()
47 );
48
50 if (
52 count($servers) > 0
53 ) {
54 $server_collection = [];
56 $active = new Setup\Metrics\Metric(
57 Setup\Metrics\Metric::STABILITY_CONFIG,
58 Setup\Metrics\Metric::TYPE_BOOL,
60 );
61 $host = new Setup\Metrics\Metric(
62 Setup\Metrics\Metric::STABILITY_CONFIG,
63 Setup\Metrics\Metric::TYPE_TEXT,
65 );
66 $port = new Setup\Metrics\Metric(
67 Setup\Metrics\Metric::STABILITY_CONFIG,
68 Setup\Metrics\Metric::TYPE_TEXT,
70 );
71 $weight = new Setup\Metrics\Metric(
72 Setup\Metrics\Metric::STABILITY_CONFIG,
73 Setup\Metrics\Metric::TYPE_TEXT,
75 );
76
77 $server_collection[] = new Setup\Metrics\Metric(
78 Setup\Metrics\Metric::STABILITY_CONFIG,
79 Setup\Metrics\Metric::TYPE_COLLECTION,
80 [
81 "active" => $active,
82 "host" => $host,
83 "port" => $port,
84 "weight" => $weight
85 ],
86 "Configured memcached node."
87 );
88 }
89
90 $nodes = new Setup\Metrics\Metric(
91 Setup\Metrics\Metric::STABILITY_CONFIG,
92 Setup\Metrics\Metric::TYPE_COLLECTION,
93 $server_collection,
94 "Collection of configured memcached nodes."
95 );
96 $storage->store("memcached_nodes", $nodes);
97 }
98
99 $component_activation = [];
101 $component_activation[$component] = new Setup\Metrics\Metric(
102 Setup\Metrics\Metric::STABILITY_CONFIG,
103 Setup\Metrics\Metric::TYPE_BOOL,
104 $settings->isComponentActivated($component)
105 );
106 }
107 $component_activation = new Setup\Metrics\Metric(
108 Setup\Metrics\Metric::STABILITY_CONFIG,
109 Setup\Metrics\Metric::TYPE_COLLECTION,
110 $component_activation,
111 "Which components are activated to use caching?"
112 );
113 $storage->store(
114 "components",
115 $component_activation
116 );
117
119 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Class ilGlobalCacheSettings.
static lookupServiceConfigName(int $service_type)
static getAvailableComponents()