Class ilGlobalCache.
More...
◆ __construct()
ilGlobalCache::__construct |
( |
|
$service_type | ) |
|
|
protected |
◆ checkSettings()
ilGlobalCache::checkSettings |
( |
| ) |
|
|
protected |
◆ delete()
ilGlobalCache::delete |
( |
|
$key | ) |
|
◆ exists()
ilGlobalCache::exists |
( |
|
$key | ) |
|
- Parameters
-
- Exceptions
-
- Returns
- bool
Definition at line 358 of file class.ilGlobalCache.php.
359 {
360 if (!$this->global_cache->isActive()) {
361 return false;
362 }
363
364 return $this->global_cache->exists(
$key);
365 }
References $key.
◆ flush()
ilGlobalCache::flush |
( |
|
$complete = false | ) |
|
- Parameters
-
- Returns
- bool
- Exceptions
-
Definition at line 436 of file class.ilGlobalCache.php.
437 {
438 if ($this->global_cache->isActive()) {
439 return $this->global_cache->flush();
440 }
441
442 return false;
443 }
◆ generateServiceId()
static ilGlobalCache::generateServiceId |
( |
| ) |
|
|
staticprotected |
- Returns
- string
Definition at line 189 of file class.ilGlobalCache.php.
190 {
191 if (!isset(self::$unique_service_id)) {
192 $rawServiceId = '_';
194 $rawServiceId .= 'il_' . CLIENT_ID;
195 }
196 self::$unique_service_id = substr(md5($rawServiceId), 0, 6);
197 }
198 }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
References defined.
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 239 of file class.ilGlobalCache.php.
240 {
242 foreach (self::$types as
$type) {
243 if ($only_available && !in_array(
$type, self::$available_types)) {
244 continue;
245 }
246 $obj =
new self(
$type);
247 $obj->initCachingService();
249 }
250
252 }
References $type, and $types.
◆ getAvailableComponents()
static ilGlobalCache::getAvailableComponents |
( |
| ) |
|
|
static |
◆ getComponent()
ilGlobalCache::getComponent |
( |
| ) |
|
◆ getInfo()
ilGlobalCache::getInfo |
( |
| ) |
|
◆ getInstallationFailureReason()
ilGlobalCache::getInstallationFailureReason |
( |
| ) |
|
- Returns
- string
Definition at line 346 of file class.ilGlobalCache.php.
347 {
348 return $this->global_cache->getInstallationFailureReason();
349 }
◆ getInstance()
static ilGlobalCache::getInstance |
( |
|
$component | ) |
|
|
static |
- Parameters
-
- Returns
- ilGlobalCache
Definition at line 117 of file class.ilGlobalCache.php.
118 {
123 $ilGlobalCache->initCachingService();
124
125 self::$instances[
$component] = $ilGlobalCache;
126 }
127
129 }
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 328 of file class.ilGlobalCache.php.
329 {
330 return count(self::getAllInstallableTypes()) > 0;
331 }
◆ isValid()
ilGlobalCache::isValid |
( |
|
$key | ) |
|
◆ 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: