ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilStaticCache Class Reference

Class ilStaticCache. More...

+ Inheritance diagram for ilStaticCache:
+ Collaboration diagram for ilStaticCache:

Public Member Functions

 exists ($key)
 
 set ($key, $serialized_value, $ttl=null)
 
 get ($key)
 
 delete ($key)
 
 flush ()
 
 serialize ($value)
 
 unserialize ($serialized_value)
 
- Public Member Functions inherited from ilGlobalCacheService
 __construct ($service_id, $component)
 
 unserialize ($serialized_value)
 
 get ($key)
 
 set ($key, $serialized_value, $ttl=null)
 
 serialize ($value)
 
 getServiceId ()
 
 setServiceId ($service_id)
 
 getComponent ()
 
 setComponent ($component)
 
 isActive ()
 
 isInstallable ()
 
 returnKey ($key)
 
 getInfo ()
 
 getInstallationFailureReason ()
 
 exists ($key)
 
 delete ($key)
 
 flush ()
 
 setServiceType ($service_type)
 
 getServiceType ()
 
 setValid ($key)
 Declare a key as valid. More...
 
 setInvalid ($key=null)
 Set the key as invalid. More...
 
 isValid ($key)
 Checks whether the cache key is valid or not. More...
 

Protected Member Functions

 getActive ()
 
 getInstallable ()
 
- Protected Member Functions inherited from ilGlobalCacheService
 getActive ()
 
 getInstallable ()
 
 getMemoryLimit ()
 
 getMinMemory ()
 
 checkMemory ()
 

Static Protected Attributes

static $cache = array()
 
- Static Protected Attributes inherited from ilGlobalCacheService
static $active = array()
 
static $installable = array()
 

Additional Inherited Members

- Protected Attributes inherited from ilGlobalCacheService
 $current_time = 0
 
 $valid_keys = array()
 
 $service_id = ''
 
 $component = ''
 
 $service_type = ilGlobalCache::TYPE_STATIC
 
 $valid_key_hash = ''
 

Detailed Description

Class ilStaticCache.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

Definition at line 13 of file class.ilStaticCache.php.

Member Function Documentation

◆ delete()

ilStaticCache::delete (   $key)
Parameters
$key
Returns
bool

Definition at line 80 of file class.ilStaticCache.php.

References $key, and ilGlobalCacheService\getComponent().

81  {
82  unset(self::$cache[$this->getComponent()][$key]);
83  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ exists()

ilStaticCache::exists (   $key)
Parameters
$key
Returns
bool

Definition at line 45 of file class.ilStaticCache.php.

References $key, and ilGlobalCacheService\getComponent().

46  {
47  return isset(self::$cache[$this->getComponent()][$key]);
48  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ flush()

ilStaticCache::flush ( )
Returns
bool

Definition at line 89 of file class.ilStaticCache.php.

References array.

90  {
91  self::$cache = array();
92 
93  return true;
94  }
Create styles array
The data for the language used.

◆ get()

ilStaticCache::get (   $key)
Parameters
$key
Returns
mixed

Definition at line 69 of file class.ilStaticCache.php.

References $key, and ilGlobalCacheService\getComponent().

70  {
71  return self::$cache[$this->getComponent()][$key];
72  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ getActive()

ilStaticCache::getActive ( )
protected
Returns
bool

Definition at line 19 of file class.ilStaticCache.php.

20  {
21  return true;
22  }

◆ getInstallable()

ilStaticCache::getInstallable ( )
protected
Returns
bool

Definition at line 28 of file class.ilStaticCache.php.

29  {
30  return true;
31  }

◆ serialize()

ilStaticCache::serialize (   $value)
Parameters
$value
Returns
mixed

Definition at line 102 of file class.ilStaticCache.php.

103  {
104  return ($value);
105  }

◆ set()

ilStaticCache::set (   $key,
  $serialized_value,
  $ttl = null 
)
Parameters
$key
$serialized_value
null$ttl
Returns
bool

Definition at line 58 of file class.ilStaticCache.php.

References $key, and ilGlobalCacheService\getComponent().

59  {
60  return self::$cache[$this->getComponent()][$key] = $serialized_value;
61  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ unserialize()

ilStaticCache::unserialize (   $serialized_value)
Parameters
$serialized_value
Returns
mixed

Definition at line 113 of file class.ilStaticCache.php.

114  {
115  return ($serialized_value);
116  }

Field Documentation

◆ $cache

ilStaticCache::$cache = array()
staticprotected

Definition at line 37 of file class.ilStaticCache.php.


The documentation for this class was generated from the following file: