ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Cache\Adaptor\PHPStatic Class Reference
+ Inheritance diagram for ILIAS\Cache\Adaptor\PHPStatic:
+ Collaboration diagram for ILIAS\Cache\Adaptor\PHPStatic:

Public Member Functions

 __construct (Config $config)
 
 isAvailable ()
 
 has (string $container, string $key)
 
 get (string $container, string $key)
 
 set (string $container, string $key, string $value, int $ttl)
 
 delete (string $container, string $key)
 
 flushContainer (string $container)
 
 flush ()
 

Static Protected Attributes

static array $cache = []
 

Additional Inherited Members

- Data Fields inherited from ILIAS\Cache\Adaptor\Adaptor\Adaptor
const CONTAINER_PREFIX_SEPARATOR = ':'
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 28 of file PHPStatic.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Cache\Adaptor\PHPStatic::__construct ( Config  $config)

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 32 of file PHPStatic.php.

33  {
34  }

Member Function Documentation

◆ delete()

ILIAS\Cache\Adaptor\PHPStatic::delete ( string  $container,
string  $key 
)

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 56 of file PHPStatic.php.

56  : void
57  {
58  unset(self::$cache[$container][$key]);
59  }
$container
Definition: wac.php:36

◆ flush()

ILIAS\Cache\Adaptor\PHPStatic::flush ( )

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 66 of file PHPStatic.php.

66  : void
67  {
68  self::$cache = [];
69  }

◆ flushContainer()

ILIAS\Cache\Adaptor\PHPStatic::flushContainer ( string  $container)

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 61 of file PHPStatic.php.

References $container.

61  : void
62  {
63  self::$cache[$container] = [];
64  }
$container
Definition: wac.php:36

◆ get()

ILIAS\Cache\Adaptor\PHPStatic::get ( string  $container,
string  $key 
)

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 46 of file PHPStatic.php.

References $container, and null.

46  : ?string
47  {
48  return self::$cache[$container][$key] ?? null;
49  }
$container
Definition: wac.php:36
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ has()

ILIAS\Cache\Adaptor\PHPStatic::has ( string  $container,
string  $key 
)

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 41 of file PHPStatic.php.

41  : bool
42  {
43  return isset(self::$cache[$container][$key]);
44  }
$container
Definition: wac.php:36

◆ isAvailable()

ILIAS\Cache\Adaptor\PHPStatic::isAvailable ( )

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 36 of file PHPStatic.php.

Referenced by ILIAS\Cache\Adaptor\Factory\getSpecific().

36  : bool
37  {
38  return true;
39  }
+ Here is the caller graph for this function:

◆ set()

ILIAS\Cache\Adaptor\PHPStatic::set ( string  $container,
string  $key,
string  $value,
int  $ttl 
)

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 51 of file PHPStatic.php.

References $container.

51  : void
52  {
53  self::$cache[$container][$key] = $value;
54  }
$container
Definition: wac.php:36

Field Documentation

◆ $cache

array ILIAS\Cache\Adaptor\PHPStatic::$cache = []
staticprotected

Definition at line 30 of file PHPStatic.php.


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