ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 74 of file class.ilStaticCache.php.

References ilGlobalCacheService\getComponent().

74  {
75  unset(self::$cache[$this->getComponent()][$key]);
76  }
+ Here is the call graph for this function:

◆ exists()

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

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

References ilGlobalCacheService\getComponent().

42  {
43  return isset(self::$cache[$this->getComponent()][$key]);
44  }
+ Here is the call graph for this function:

◆ flush()

ilStaticCache::flush ( )
Returns
bool

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

References array.

82  {
83  self::$cache = array();
84 
85  return true;
86  }
Create styles array
The data for the language used.

◆ get()

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

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

References ilGlobalCacheService\getComponent().

64  {
65  return self::$cache[$this->getComponent()][$key];
66  }
+ Here is the call graph for this function:

◆ getActive()

ilStaticCache::getActive ( )
protected
Returns
bool

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

18  {
19  return true;
20  }

◆ getInstallable()

ilStaticCache::getInstallable ( )
protected
Returns
bool

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

26  {
27  return true;
28  }

◆ serialize()

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

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

94  {
95  return ($value);
96  }

◆ set()

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

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

References ilGlobalCacheService\getComponent().

54  {
55  return self::$cache[$this->getComponent()][$key] = $serialized_value;
56  }
+ Here is the call graph for this function:

◆ unserialize()

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

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

104  {
105  return ($serialized_value);
106  }

Field Documentation

◆ $cache

ilStaticCache::$cache = array()
staticprotected

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


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