ClearCache
in package
Description of ClearCache
Tags
Table of Contents
Constants
- BY_MOD_TIME = 1
- BY_SIZE = 2
Properties
- $dir : string
Methods
- __construct() : mixed
- clean() : void
- Assures caches doesn't exceed a given size.
Constants
BY_MOD_TIME
public
mixed
BY_MOD_TIME
= 1
BY_SIZE
public
mixed
BY_SIZE
= 2
Properties
$dir
private
string
$dir
Methods
__construct()
public
__construct(string $cacheDir) : mixed
Parameters
- $cacheDir : string
clean()
Assures caches doesn't exceed a given size.
public
clean(int $maxSizeMb, int $mode) : void
Parameters
- $maxSizeMb : int
-
maximum cache size in MB
- $mode : int
-
which files should be removed first
-
ClearCache::BY_MOD_TIME
- oldest -
ClearCache::BY_SIZE
- biggest
-