Skip to main content
Version: Fegg 5.x

Cache::clear

Remove every value

Description​

public static int Cache::clear()

Removes every cache file of the directory and returns how many were removed. fegg-cli cache:clear calls it.

Example​

use Fegg\Tool\Cache;

$count = Cache::clear();
The same from the command line
./fegg-cli cache:clear
# OK: 3 value(s) removed from /path/to/htdocs/_fegg/site/data/cache/data