forked from ceeram/clear_cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
53 lines (45 loc) · 1.23 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
)
)