Cache defines the interface for cache implementations.
Caches are divided into different sections, which store key value pairs.
- Author
- ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m
Definition at line 21 of file Cache.php.
◆ exists()
exists |
( |
|
$section, |
|
|
|
$key |
|
) |
| |
Check if a cache entry exists.
- Parameters
-
$section | The cache section |
$key | The cache key |
- Returns
- boolean
Implemented in FileCache, and NullCache.
◆ getDate()
getDate |
( |
|
$section, |
|
|
|
$key |
|
) |
| |
Get the date of the specified cache entry.
- Parameters
-
$section | The cache section |
$key | The cache key |
- Returns
- DateTime or null, if not cached
Implemented in FileCache.
◆ get()
Get the value of the specified cache entry.
- Parameters
-
$section | The cache section |
$key | The cache key |
- Returns
- Mixed
Implemented in FileCache, and NullCache.
◆ put()
put |
( |
|
$section, |
|
|
|
$key, |
|
|
|
$value, |
|
|
|
$lifetime = null |
|
) |
| |
Store the value of the specified cache entry with an optional lifetime.
- Parameters
-
$section | The cache section |
$key | The key |
$value | The value |
$lifetime | The lifetime in seconds (optional) |
Implemented in FileCache, and NullCache.
◆ clear()
Clear the given cache section.
The wildcard char '*' may be added to the section name in order to clear all matching sections.
- Parameters
-
$section | The cache section |
Implemented in FileCache, and NullCache.
◆ clearAll()