Class ilGlobalCache.
More...
Protected Member Functions |
| | __construct ($service_type_id, $component=NULL) |
Detailed Description
Constructor & Destructor Documentation
| ilGlobalCache::__construct |
( |
|
$service_type_id, |
|
|
|
$component = NULL |
|
) |
| |
|
protected |
Member Function Documentation
| ilGlobalCache::delete |
( |
|
$key | ) |
|
- Parameters
-
- Exceptions
-
- Returns
- bool
Definition at line 344 of file class.ilGlobalCache.php.
{
if (!$this->isActive()) {
return false;
throw new RuntimeException(self::MSG);
}
return $this->global_cache->delete($key);
}
| ilGlobalCache::exists |
( |
|
$key | ) |
|
- Parameters
-
- Exceptions
-
- Returns
- bool
Definition at line 286 of file class.ilGlobalCache.php.
{
if (!$this->global_cache->isActive()) {
return false;
}
return $this->global_cache->exists($key);
}
| ilGlobalCache::flush |
( |
|
$complete = false | ) |
|
- Parameters
-
- Returns
- bool
- Exceptions
-
Definition at line 361 of file class.ilGlobalCache.php.
{
if ($this->global_cache->isActive()) {
if ($complete) {
return $this->global_cache->flush();
} else {
$this->global_cache->setInvalid();
}
}
return false;
}
| static ilGlobalCache::generateServiceId |
( |
| ) |
|
|
staticprotected |
| ilGlobalCache::get |
( |
|
$key | ) |
|
- Parameters
-
- Exceptions
-
- Returns
- mixed
Definition at line 319 of file class.ilGlobalCache.php.
{
if (!$this->isActive()) {
return false;
}
$unserialized_return = $this->global_cache->unserialize($this->global_cache->get($key));
if ($unserialized_return) {
if ($this->global_cache->isValid($key)) {
return $unserialized_return;
} else {
}
}
return NULL;
}
| ilGlobalCache::getActive |
( |
| ) |
|
| static ilGlobalCache::getAllInstallableTypes |
( |
| ) |
|
|
static |
| static ilGlobalCache::getAllTypes |
( |
| ) |
|
|
static |
| ilGlobalCache::getComponent |
( |
| ) |
|
| ilGlobalCache::getInfo |
( |
| ) |
|
| ilGlobalCache::getInstallationFailureReason |
( |
| ) |
|
- Returns
- string
Definition at line 275 of file class.ilGlobalCache.php.
{
return $this->global_cache->getInstallationFailureReason();
}
| static ilGlobalCache::getInstance |
( |
|
$component | ) |
|
|
static |
| ilGlobalCache::getServiceid |
( |
| ) |
|
| ilGlobalCache::getServiceType |
( |
| ) |
|
| ilGlobalCache::isCacheServiceInstallable |
( |
| ) |
|
| ilGlobalCache::isInstallable |
( |
| ) |
|
| ilGlobalCache::isValid |
( |
|
$key | ) |
|
| static ilGlobalCache::lookupServiceName |
( |
|
$type_id | ) |
|
|
staticprotected |
- Parameters
-
- Returns
- string
Definition at line 201 of file class.ilGlobalCache.php.
Referenced by __construct().
{
switch ($type_id) {
case self::TYPE_APC:
return 'ilApc';
break;
case self::TYPE_MEMCACHED:
return 'ilMemcache';
break;
case self::TYPE_XCACHE:
return 'ilXcache';
break;
default:
return 'ilStaticCache';
break;
}
}
| ilGlobalCache::set |
( |
|
$key, |
|
|
|
$value, |
|
|
|
$ttl = NULL |
|
) |
| |
- Parameters
-
- Exceptions
-
- Returns
- bool
Definition at line 303 of file class.ilGlobalCache.php.
{
if (!$this->isActive()) {
return false;
}
$this->global_cache->setValid($key);
return $this->global_cache->set($key, $this->global_cache->serialize($value), $ttl);
}
| ilGlobalCache::setActive |
( |
|
$active | ) |
|
| ilGlobalCache::setComponent |
( |
|
$component | ) |
|
| ilGlobalCache::setServiceid |
( |
|
$service_id | ) |
|
| ilGlobalCache::setServiceType |
( |
|
$service_type | ) |
|
Field Documentation
| ilGlobalCache::$active = true |
|
protected |
| ilGlobalCache::$active_components |
|
staticprotected |
Initial value: array(
self::COMP_CLNG,
self::COMP_OBJ_DEF,
self::COMP_ILCTRL,
self::COMP_COMPONENT,
self::COMP_TEMPLATE,
self::COMP_EVENTS,
)
Definition at line 42 of file class.ilGlobalCache.php.
| ilGlobalCache::$component |
|
protected |
| ilGlobalCache::$global_cache |
|
protected |
| ilGlobalCache::$instances |
|
staticprotected |
| ilGlobalCache::$service_id = '' |
|
protected |
| ilGlobalCache::$type_per_component = array() |
|
staticprotected |
| ilGlobalCache::$unique_service_id = NULL |
|
staticprotected |
| const ilGlobalCache::ACTIVE = true |
| const ilGlobalCache::COMP_CLNG = 'clng' |
| const ilGlobalCache::COMP_COMPONENT = 'comp' |
| const ilGlobalCache::COMP_EVENTS = 'events' |
| const ilGlobalCache::COMP_ILCTRL = 'ilctrl' |
| const ilGlobalCache::COMP_OBJ_DEF = 'obj_def' |
| const ilGlobalCache::COMP_PLUGINS = 'plugins' |
| const ilGlobalCache::COMP_RBAC_UA = 'rbac_ua' |
| const ilGlobalCache::COMP_TEMPLATE = 'tpl' |
| const ilGlobalCache::MSG = 'Global Cache not active, can not access cache' |
| const ilGlobalCache::TYPE_APC = 3 |
| const ilGlobalCache::TYPE_FALLBACK = self::TYPE_STATIC |
| const ilGlobalCache::TYPE_MEMCACHED = 2 |
| const ilGlobalCache::TYPE_STATIC = 0 |
| const ilGlobalCache::TYPE_XCACHE = 1 |
The documentation for this class was generated from the following file: