2 require_once(
'./Services/GlobalCache/classes/class.ilGlobalCache.php');
52 $this->
setActive($ilIniFile->
readVariable(self::INI_HEADER_CACHE, self::INI_FIELD_ACTIVATE_GLOBAL_CACHE));
53 $this->
setService($ilIniFile->
readVariable(self::INI_HEADER_CACHE, self::INI_FIELD_GLOBAL_CACHE_SERVICE_TYPE));
58 $cache_components = $ilIniFile->
readGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
59 if (is_array($cache_components)) {
60 foreach ($cache_components as $comp => $v) {
75 $ilIniFile->
setVariable(self::INI_HEADER_CACHE, self::INI_FIELD_ACTIVATE_GLOBAL_CACHE, $this->
isActive() ?
'1' :
'0');
76 $ilIniFile->
setVariable(self::INI_HEADER_CACHE, self::INI_FIELD_GLOBAL_CACHE_SERVICE_TYPE, $this->
getService());
79 $ilIniFile->
removeGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
80 $ilIniFile->
addGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
84 if ($ilIniFile->
write()) {
103 $this->activated_components[] = $component;
104 $this->activated_components = array_unique($this->activated_components);
110 $this->activated_components = array();
121 return in_array($component, $this->activated_components);
193 if (!$ilIniFile->
readGroup(self::INI_HEADER_CACHE)) {
194 $ilIniFile->
addGroup(self::INI_HEADER_CACHE);
196 if (!$ilIniFile->
readGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS)) {
197 $ilIniFile->
addGroup(self::INI_HEADER_CACHE_ACTIVATED_COMPONENTS);
247 foreach ($r->getConstants() as $k => $v) {
248 if (strpos($k,
'LOG_LEVEL') === 0 and $v == $level) {
258 $this->memcached_nodes[] = $node_id;
areAllComponentActivated()
checkIniHeader(ilIniFile $ilIniFile)
writeToIniFile(ilIniFile $ilIniFile)
addMemcachedNode(ilMemcacheServer $node_id)
setVariable($a_group_name, $a_var_name, $a_var_value)
sets a variable in a group public
write()
save ini-file-data to filesystem private
readVariable($a_group, $a_var_name)
reads a single variable from a group public
isComponentActivated($component)
Class ilGlobalCacheSettings.
readFromIniFile(ilIniFile $ilIniFile)
static lookupServiceClassName($service_type)
removeGroup($a_group_name)
removes a group public
static getAvailableComponents()
setActivatedComponents($activated_components)
resetActivatedComponents()
lookupLogLevelName($level)
addActivatedComponent($component)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static log($message, $log_level)
const INI_FIELD_ACTIVATE_GLOBAL_CACHE
const INI_FIELD_LOG_LEVEL
const INI_HEADER_CACHE_ACTIVATED_COMPONENTS
const INI_FIELD_GLOBAL_CACHE_SERVICE_TYPE
addGroup($a_group_name)
adds a new group public
readGroup($a_group_name)
returns an associative array of the variables in one group public