◆ __construct()
__construct |
( |
|
$hostname, |
|
|
|
$port, |
|
|
string |
$auth = '' |
|
) |
| |
Construct a cache instance.
- Parameters
-
string | $hostname | Hostname of redis server |
int | $port | Port of redis server |
string | $auth | Optional auth token/password |
◆ __call()
__call |
( |
|
$method, |
|
|
|
$args |
|
) |
| |
- Parameters
-
string | $method | Method to call |
array | $args | Arguments to pass |
- Returns
- false|mixed
◆ expire()
Expire item from the cache.
Example:
expires foo
$cache->expire('foo');
- Parameters
-
Implements StudipCache.
◆ flush()
Expire all items from the cache.
Implements StudipCache.
◆ getConfig()
Return the Vue component name and props that handle configuration. The associative array is of the form [ 'component' => <Vue component="" name>="">, 'props' => <Properties for="" component>=""> ]
- Returns
- array
Implements StudipCache.
◆ getDisplayName()
static getDisplayName |
( |
| ) |
|
|
static |
- Returns
- string A translateable display name for this cache class.
Implements StudipCache.
◆ getRedis()
Returns the instance of the redis server connection.
- Returns
- Redis instance
◆ getStats()
Return statistics.
::getStats()
- Returns
- array|array[]
Implements StudipCache.
◆ read()
Retrieve item from the server.
Example:
reads foo
$foo = $cache->reads('foo');
- Parameters
-
- Returns
- mixed the previously stored data if an item with such a key exists on the server or FALSE on failure.
Implements StudipCache.
◆ write()
write |
( |
|
$name, |
|
|
|
$content, |
|
|
|
$expire = self::DEFAULT_EXPIRATION |
|
) |
| |
Store data at the server.
- Parameters
-
string | the item's key. |
string | the item's content. |
int | the item's expiry time in seconds. Defaults to 12h. |
- Returns
- mixed returns TRUE on success or FALSE on failure.
Implements StudipCache.
The documentation for this class was generated from the following file: