◆ cacheRead()
cacheRead |
( |
|
$key, |
|
|
|
$regenFunction, |
|
|
|
$ttl = null , |
|
|
|
$args = null |
|
) |
| |
cache block wrapper
If the cache read for $key is a miss, call the $regenFunction to update it.
- Paramètres
-
string | $key | Identifier for the cache item |
callable | $regenFunction | function to generate cached content |
int | null | $ttl | time to live, number of seconds as integer or null for default |
mixed | $args | variable argument list for $regenFunction |
- Renvoie
- mixed
◆ delete()
Delete a key from the cache
- Paramètres
-
string | $key | Identifier for the data |
- Renvoie
- void
◆ init()
Initialize parent::__construct calls this after verifying module object.
- Renvoie
- void
Réimplémentée à partir de AbstractHelper.
◆ prefix()
Add our module prefix to a name
- Paramètres
-
string | $name | name to prefix |
- Renvoie
- string module prefixed name
◆ read()
read |
( |
|
$key, |
|
|
|
$default = false |
|
) |
| |
Read value for a key from the cache
- Paramètres
-
string | $key | Identifier for the data |
mixed | $default | default value to return if config $key is not set |
- Renvoie
- mixed value if key was set, false not set or expired
◆ write()
write |
( |
|
$key, |
|
|
|
$value, |
|
|
|
$ttl = null |
|
) |
| |
Write a value for a key to the cache
- Paramètres
-
string | $key | Identifier for the data |
mixed | $value | Data to be cached - anything except a resource |
int | null | $ttl | Time to live in seconds |
- Renvoie
- bool True if the data was successfully cached, false on failure
◆ $cache
◆ $prefix
La documentation de cette classe a été générée à partir du fichier suivant :
- XoopsCore25-2.5.11-Beta1/htdocs/class/libraries/vendor/xoops/xmf/src/Module/Helper/Cache.php