Class ilGlobalCache.
More...
◆ __construct()
ilGlobalCache::__construct |
( |
|
$service_type | ) |
|
|
protected |
◆ checkSettings()
ilGlobalCache::checkSettings |
( |
| ) |
|
|
protected |
◆ delete()
ilGlobalCache::delete |
( |
|
$key | ) |
|
- Parameters
-
- Returns
- bool
Definition at line 398 of file class.ilGlobalCache.php.
398 {
400 return false;
401 }
402
403 return $this->global_cache->delete($key);
404 }
References isActive().
◆ exists()
ilGlobalCache::exists |
( |
|
$key | ) |
|
- Parameters
-
- Exceptions
-
- Returns
- bool
Definition at line 339 of file class.ilGlobalCache.php.
339 {
340 if (!$this->global_cache->isActive()) {
341 return false;
342 }
343
344 return $this->global_cache->exists($key);
345 }
◆ flush()
ilGlobalCache::flush |
( |
|
$complete = false | ) |
|
- Parameters
-
- Returns
- bool
- Exceptions
-
Definition at line 413 of file class.ilGlobalCache.php.
413 {
414 if ($this->global_cache->isActive()) {
415 if ($complete) {
416 return $this->global_cache->flush();
417 } else {
418 $this->global_cache->setInvalid();
419 }
420 }
421
422 return false;
423 }
◆ generateServiceId()
static ilGlobalCache::generateServiceId |
( |
| ) |
|
|
staticprotected |
- Returns
- string
Definition at line 184 of file class.ilGlobalCache.php.
184 {
185 if (!isset(self::$unique_service_id)) {
186 self::$unique_service_id = substr(md5('il_' . CLIENT_ID), 0, 6);
187 }
188 }
Referenced by __construct().
◆ get()
ilGlobalCache::get |
( |
|
$key | ) |
|
◆ getActive()
ilGlobalCache::getActive |
( |
| ) |
|
◆ getActiveComponents()
static ilGlobalCache::getActiveComponents |
( |
| ) |
|
|
static |
◆ getAllInstallableTypes()
static ilGlobalCache::getAllInstallableTypes |
( |
| ) |
|
|
static |
◆ getAllTypes()
static ilGlobalCache::getAllTypes |
( |
|
$only_available = true | ) |
|
|
static |
- Parameters
-
- Returns
- array
Definition at line 227 of file class.ilGlobalCache.php.
227 {
229 foreach (self::$types as $type) {
230 if ($only_available && !in_array($type, self::$available_types)) {
231 continue;
232 }
233 $obj = new self($type);
234 $obj->initCachingService();
236 }
237
239 }
References $types.
◆ getAvailableComponents()
static ilGlobalCache::getAvailableComponents |
( |
| ) |
|
|
static |
◆ getComponent()
ilGlobalCache::getComponent |
( |
| ) |
|
◆ getInfo()
ilGlobalCache::getInfo |
( |
| ) |
|
◆ getInstallationFailureReason()
ilGlobalCache::getInstallationFailureReason |
( |
| ) |
|
- Returns
- string
Definition at line 328 of file class.ilGlobalCache.php.
328 {
329 return $this->global_cache->getInstallationFailureReason();
330 }
◆ getInstance()
static ilGlobalCache::getInstance |
( |
|
$component | ) |
|
|
static |
- Parameters
-
- Returns
- ilGlobalCache
Definition at line 116 of file class.ilGlobalCache.php.
116 {
121 $ilGlobalCache->initCachingService();
122
123 self::$instances[
$component] = $ilGlobalCache;
124 }
125
127 }
References $component, $service_type, and getSettings().
Referenced by ilCachedComponentData\__construct(), ilCachedCtrl\__construct(), ilCachedComponentData\__destruct(), ilCachedComponentData\flush(), ilCachedCtrl\flush(), ilGlobalCacheQueryWrapper\get(), HTML_Template_IT\getFile(), ilCachedComponentData\getInstance(), ilCachedCtrl\getInstance(), HTML_Template_IT\init(), ilAppEventHandler\initListeners(), ilCachedCtrl\isActive(), and ilObjectDefinition\readDefinitionData().
◆ getServiceType()
ilGlobalCache::getServiceType |
( |
| ) |
|
◆ getSettings()
static ilGlobalCache::getSettings |
( |
| ) |
|
|
static |
◆ isActive()
ilGlobalCache::isActive |
( |
| ) |
|
◆ isCacheServiceInstallable()
ilGlobalCache::isCacheServiceInstallable |
( |
| ) |
|
◆ isInstallable()
ilGlobalCache::isInstallable |
( |
| ) |
|
- Returns
- bool
Definition at line 312 of file class.ilGlobalCache.php.
312 {
313 return count(self::getAllInstallableTypes()) > 0;
314 }
◆ isValid()
ilGlobalCache::isValid |
( |
|
$key | ) |
|
- Parameters
-
- Returns
- bool
Definition at line 304 of file class.ilGlobalCache.php.
304 {
305 return $this->global_cache->isValid($key);
306 }
◆ log()
static ilGlobalCache::log |
( |
|
$message, |
|
|
|
$log_level |
|
) |
| |
|
static |
◆ lookupServiceClassName()
static ilGlobalCache::lookupServiceClassName |
( |
|
$service_type | ) |
|
|
static |
◆ set()
ilGlobalCache::set |
( |
|
$key, |
|
|
|
$value, |
|
|
|
$ttl = null |
|
) |
| |
◆ setActive()
ilGlobalCache::setActive |
( |
|
$active | ) |
|
◆ setActiveComponents()
static ilGlobalCache::setActiveComponents |
( |
|
$active_components | ) |
|
|
static |
◆ setAvailableComponents()
static ilGlobalCache::setAvailableComponents |
( |
|
$available_components | ) |
|
|
static |
◆ setComponent()
ilGlobalCache::setComponent |
( |
|
$component | ) |
|
◆ setServiceType()
ilGlobalCache::setServiceType |
( |
|
$service_type | ) |
|
◆ setSettings()
static ilGlobalCache::setSettings |
( |
|
$settings | ) |
|
|
static |
◆ setup()
◆ $active
ilGlobalCache::$active = true |
|
protected |
◆ $active_cache
ilGlobalCache::$active_cache = array() |
|
staticprotected |
◆ $active_components
ilGlobalCache::$active_components = array() |
|
staticprotected |
◆ $available_components
ilGlobalCache::$available_components |
|
staticprotected |
◆ $available_types
ilGlobalCache::$available_types |
|
staticprotected |
Initial value:= array(
self::TYPE_MEMCACHED,
self::TYPE_XCACHE,
self::TYPE_APC,
self::TYPE_STATIC,
)
Definition at line 45 of file class.ilGlobalCache.php.
◆ $component
ilGlobalCache::$component |
|
protected |
◆ $global_cache
ilGlobalCache::$global_cache |
|
protected |
◆ $instances
ilGlobalCache::$instances |
|
staticprotected |
◆ $service_type
◆ $settings
◆ $type_per_component
ilGlobalCache::$type_per_component = array() |
|
staticprotected |
◆ $types
◆ $unique_service_id
ilGlobalCache::$unique_service_id = null |
|
staticprotected |
◆ ACTIVE
const ilGlobalCache::ACTIVE = true |
◆ COMP_CLNG
const ilGlobalCache::COMP_CLNG = 'clng' |
◆ COMP_COMPONENT
const ilGlobalCache::COMP_COMPONENT = 'comp' |
◆ COMP_EVENTS
const ilGlobalCache::COMP_EVENTS = 'events' |
◆ COMP_ILCTRL
const ilGlobalCache::COMP_ILCTRL = 'ilctrl' |
◆ COMP_OBJ_DEF
const ilGlobalCache::COMP_OBJ_DEF = 'obj_def' |
◆ COMP_PLUGINS
const ilGlobalCache::COMP_PLUGINS = 'plugins' |
◆ COMP_RBAC_UA
const ilGlobalCache::COMP_RBAC_UA = 'rbac_ua' |
◆ COMP_TEMPLATE
const ilGlobalCache::COMP_TEMPLATE = 'tpl' |
◆ COMP_TPL_BLOCKS
const ilGlobalCache::COMP_TPL_BLOCKS = 'tpl_blocks' |
◆ COMP_TPL_VARIABLES
const ilGlobalCache::COMP_TPL_VARIABLES = 'tpl_variables' |
◆ MSG
const ilGlobalCache::MSG = 'Global Cache not active, can not access cache' |
◆ TYPE_APC
const ilGlobalCache::TYPE_APC = 3 |
◆ TYPE_FALLBACK
const ilGlobalCache::TYPE_FALLBACK = self::TYPE_STATIC |
◆ TYPE_MEMCACHED
const ilGlobalCache::TYPE_MEMCACHED = 2 |
◆ TYPE_STATIC
const ilGlobalCache::TYPE_STATIC = 0 |
◆ TYPE_XCACHE
const ilGlobalCache::TYPE_XCACHE = 1 |
The documentation for this class was generated from the following file: