◆ __construct()
| __construct |
( |
|
$args = [] | ) |
|
without the 'dir' argument the cache path is taken from $CACHING_FILECACHE_PATH or is set to $TMP_PATH/studip_cache
- Parameters
-
| array | use $args['dir'] to set cache directory |
- Returns
- void
- Exceptions
-
| exception | if the directory does not exist or could not be created |
◆ expire()
◆ flush()
Expire all items from the cache.
Implements StudipCache.
◆ getCacheDir()
get path to cache directory
- Returns
- string
◆ purge()
| purge |
( |
|
$be_quiet = true | ) |
|
purges expired entries from the cache directory
- Parameters
-
| bool | echo messages if set to false |
- Returns
- int the number of deleted files
◆ read()
◆ write()
| write |
( |
|
$key, |
|
|
|
$content, |
|
|
|
$expire = 43200 |
|
) |
| |
store data as cache item in filesystem
- See also
- StudipCache::write()
- Parameters
-
| string | a cache key |
| mixed | data to store |
| int | expiry time in seconds, default 12h |
- Returns
- int|bool the number of bytes that were written to the file, or false on failure
Implements StudipCache.
The documentation for this class was generated from the following file: