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

Public Member Functions

 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 ()
 
- Public Member Functions inherited from ILIAS\Cache\Adaptor\BaseAdaptor
 __construct (protected Config $config)
 
- Public Member Functions inherited from ILIAS\Cache\Adaptor\Adaptor\Adaptor
 __construct (Config $config)
 

Additional Inherited Members

- Data Fields inherited from ILIAS\Cache\Adaptor\Adaptor\Adaptor
const CONTAINER_PREFIX_SEPARATOR = ':'
 
- Protected Member Functions inherited from ILIAS\Cache\Adaptor\BaseAdaptor
 buildKey (string $container, string $key)
 
 buildContainerPrefix (string $container)
 
- Protected Attributes inherited from ILIAS\Cache\Adaptor\BaseAdaptor
const LOCK_UNTIL = '_lock_until'
 

Detailed Description

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

Definition at line 26 of file APCu.php.

Member Function Documentation

◆ delete()

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

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 48 of file APCu.php.

References ILIAS\Cache\Adaptor\BaseAdaptor\buildKey().

48  : void
49  {
50  apcu_delete($this->buildKey($container, $key));
51  }
buildKey(string $container, string $key)
Definition: BaseAdaptor.php:42
$container
Definition: wac.php:36
+ Here is the call graph for this function:

◆ flush()

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

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 58 of file APCu.php.

58  : void
59  {
60  apcu_clear_cache();
61  }

◆ flushContainer()

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

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 53 of file APCu.php.

References ILIAS\Cache\Adaptor\BaseAdaptor\buildContainerPrefix().

53  : void
54  {
55  apcu_delete(new \APCUIterator('/^' . $this->buildContainerPrefix($container) . '/'));
56  }
buildContainerPrefix(string $container)
Definition: BaseAdaptor.php:47
$container
Definition: wac.php:36
+ Here is the call graph for this function:

◆ get()

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

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 38 of file APCu.php.

References ILIAS\Cache\Adaptor\BaseAdaptor\buildKey(), and null.

38  : ?string
39  {
40  return apcu_fetch($this->buildKey($container, $key)) ?: null;
41  }
buildKey(string $container, string $key)
Definition: BaseAdaptor.php:42
$container
Definition: wac.php:36
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ has()

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

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 33 of file APCu.php.

References ILIAS\Cache\Adaptor\BaseAdaptor\buildKey().

33  : bool
34  {
35  return apcu_exists($this->buildKey($container, $key));
36  }
buildKey(string $container, string $key)
Definition: BaseAdaptor.php:42
$container
Definition: wac.php:36
+ Here is the call graph for this function:

◆ isAvailable()

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

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 28 of file APCu.php.

28  : bool
29  {
30  return function_exists('apcu_fetch');
31  }

◆ set()

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

Implements ILIAS\Cache\Adaptor\Adaptor\Adaptor.

Definition at line 43 of file APCu.php.

References ILIAS\Cache\Adaptor\BaseAdaptor\buildKey().

43  : void
44  {
45  apcu_store($this->buildKey($container, $key), $value, $ttl);
46  }
buildKey(string $container, string $key)
Definition: BaseAdaptor.php:42
$container
Definition: wac.php:36
+ Here is the call graph for this function:

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