Skip to content

clear cakephp cache dirs with shell or from your app

Notifications You must be signed in to change notification settings

prgTW/clear_cache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Usage:

Run from your console:
"cake clear_cache"
or "cake clear_cache files"
or "cake clear_cache files ."
or "cake clear_cache files views"
or "cake clear_cache files models persistent"
or "cake clear_cache engines"
or "cake clear_cache engines default"
or "cake clear_cache engines _cake_core_"
or "cake clear_cache engines default custom"

Run from your app:
<?php
App::import('Libs', 'ClearCache.ClearCache');
$ClearCache = new ClearCache();

$output = $ClearCache->run();

$output = $ClearCache->files();
$output = $ClearCache->files('.');
$output = $ClearCache->files('views');
$output = $ClearCache->files('models', 'persistent');

$output = $ClearCache->engines();
$output = $ClearCache->engines('_cake_core_');
$output = $ClearCache->engines('default', 'custom');
?>

files() returns an associative array of deleted/undeleted files
array(
	'deleted' => array(...),
	'error'   => array(...)
)

engines() returns an associative array of result
array(
	'default' => true,
	'_cake_core_'   => false
)

run() returns an associative array of result
array(
	'files' => array(
		'deleted' => array(...),
		'error'   => array(...)
	),
	'engines' => array(
		'default' => true,
		'_cake_core_'   => false
	)
)

About

clear cakephp cache dirs with shell or from your app

Resources

Stars

Watchers

Forks

Packages

No packages published