Cache_Lite::clean

Cache_Lite::clean() – Clean the cache

Synopsis

require_once 'Cache/Lite.php';

boolean Cache_Lite::clean ( string $group = false , string $mode = 'ingroup'; )

Description

if no group is specified all cache files will be destroyed ; else only cache files of the specified group will be destroyed

Parameter

string $group

name of the cache group

string $mode

flush cache mode : 'old' (clean too old cache files for the current lifetime), 'ingroup' (clean all cache files for the given group), 'notingroup' (clean all the cache files except for the given group), [since 1.5.0 beta] 'callback_myFunc' (call the function 'myFunc' with the complete path file and the group in parameters, if the callback return 'true', the cache file is deleted).

Return value

returns true if no problem

Note

This function can not be called statically.

Example

Usage

<?php
require_once 'Cache/Lite.php';

$options = array('cacheDir' => '/tmp/');
$cache = new Cache_Lite($options);

$cache->clean();

?>

This example cleans all of the cache files.

Remove a cache file (Previous) Set to debug mode (Next)
Last updated: Thu, 31 Jul 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.