SlaxWeb\Cache\Handler\File::__construct |
( |
string |
$path, |
|
|
int |
$maxAge = 0 |
|
) |
| |
Class constructor
The File Cache handler requires the path of the cache location, where the handler will store the cache data to. The constructor simply stores this path to the protected property. The constructor also checks if the handler can write to that location, and throws an exception if that is not the case.
- Parameters
-
string | $path | Filesystem location |
int | $maxAge | Default maximum age in seconds, default 0 |
- Exceptions
-
| SlaxWeb thrown if the cache filesystem location is not writable |
SlaxWeb\Cache\Handler\File::exists |
( |
string |
$name | ) |
|
SlaxWeb\Cache\Handler\File::get |
( |
string |
$name | ) |
|
SlaxWeb\Cache\Handler\File::remove |
( |
string |
$name, |
|
|
bool |
$partial = false |
|
) |
| |
SlaxWeb\Cache\Handler\File::removePartial |
( |
|
$name | ) |
|
|
protected |
Remove partial
Removes all files containing '$name' from the cache location.
- Parameters
-
string | $name | Name of the data stored in cache |
- Returns
- bool
SlaxWeb\Cache\Handler\File::write |
( |
string |
$name, |
|
|
string |
$data, |
|
|
int |
$maxAge = -1 |
|
) |
| |
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/cache/src/Handler/File.php