ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SimpleSAML\Store\Memcache Class Reference
+ Inheritance diagram for SimpleSAML\Store\Memcache:
+ Collaboration diagram for SimpleSAML\Store\Memcache:

Public Member Functions

 get ($type, $key)
 Retrieve a value from the data store. More...
 
 set ($type, $key, $value, $expire=null)
 Save a value to the data store. More...
 
 delete ($type, $key)
 Delete a value from the data store. More...
 
- Public Member Functions inherited from SimpleSAML\Store
 get ($type, $key)
 Retrieve a value from the data store. More...
 
 set ($type, $key, $value, $expire=null)
 Save a value to the data store. More...
 
 delete ($type, $key)
 Delete a value from the data store. More...
 

Protected Member Functions

 __construct ()
 This function implements the constructor for this class. More...
 

Private Attributes

 $prefix
 

Additional Inherited Members

- Static Public Member Functions inherited from SimpleSAML\Store
static getInstance ()
 Retrieve our singleton instance. More...
 

Detailed Description

Definition at line 13 of file Memcache.php.

Constructor & Destructor Documentation

◆ __construct()

SimpleSAML\Store\Memcache::__construct ( )
protected

This function implements the constructor for this class.

It loads the Memcache configuration.

Definition at line 26 of file Memcache.php.

References $config.

27  {
28  $config = Configuration::getInstance();
29  $this->prefix = $config->getString('memcache_store.prefix', 'simpleSAMLphp');
30  }
$config
Definition: bootstrap.php:15

Member Function Documentation

◆ delete()

SimpleSAML\Store\Memcache::delete (   $type,
  $key 
)

Delete a value from the data store.

Parameters
string$typeThe data type.
string$keyThe key.

Definition at line 77 of file Memcache.php.

References $type, and SimpleSAML_Memcache\delete().

78  {
79  assert(is_string($type));
80  assert(is_string($key));
81 
82  \SimpleSAML_Memcache::delete($this->prefix . '.' . $type . '.' . $key);
83  }
$type
static delete($key)
Delete a key-value pair from the memcache servers.
Definition: Memcache.php:179
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ get()

SimpleSAML\Store\Memcache::get (   $type,
  $key 
)

Retrieve a value from the data store.

Parameters
string$typeThe data type.
string$keyThe key.
Returns
mixed|null The value.

Definition at line 40 of file Memcache.php.

References $key, $type, and ILIAS\GlobalScreen\get().

41  {
42  assert(is_string($type));
43  assert(is_string($key));
44 
45  return \SimpleSAML_Memcache::get($this->prefix . '.' . $type . '.' . $key);
46  }
$type
get(string $class_name)
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ set()

SimpleSAML\Store\Memcache::set (   $type,
  $key,
  $value,
  $expire = null 
)

Save a value to the data store.

Parameters
string$typeThe data type.
string$keyThe key.
mixed$valueThe value.
int | NULL$expireThe expiration time (unix timestamp), or NULL if it never expires.

Definition at line 57 of file Memcache.php.

References $type, and SimpleSAML_Memcache\set().

58  {
59  assert(is_string($type));
60  assert(is_string($key));
61  assert($expire === null || (is_int($expire) && $expire > 2592000));
62 
63  if ($expire === null) {
64  $expire = 0;
65  }
66 
67  \SimpleSAML_Memcache::set($this->prefix . '.' . $type . '.' . $key, $value, $expire);
68  }
$expire
Definition: saml2-acs.php:140
$type
static set($key, $value, $expire=null)
Save a key-value pair to the memcache servers.
Definition: Memcache.php:149
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $prefix

SimpleSAML\Store\Memcache::$prefix
private

Definition at line 20 of file Memcache.php.


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