File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function __construct($connection)
49
49
* Build metadata.
50
50
*
51
51
* @param string|null $name The name of the table to build cache data for.
52
- * @return bool
52
+ * @return array Returns a list build table caches
53
53
*/
54
54
public function build ($ name = null )
55
55
{
@@ -62,14 +62,14 @@ public function build($name = null)
62
62
$ this ->_schema ->describe ($ table , ['forceRefresh ' => true ]);
63
63
}
64
64
65
- return true ;
65
+ return $ tables ;
66
66
}
67
67
68
68
/**
69
69
* Clear metadata.
70
70
*
71
71
* @param string|null $name The name of the table to clear cache data for.
72
- * @return bool
72
+ * @return array Returns a list of cleared table caches
73
73
*/
74
74
public function clear ($ name = null )
75
75
{
@@ -84,7 +84,7 @@ public function clear($name = null)
84
84
Cache::delete ($ key , $ configName );
85
85
}
86
86
87
- return true ;
87
+ return $ tables ;
88
88
}
89
89
90
90
/**
Original file line number Diff line number Diff line change @@ -46,7 +46,11 @@ class OrmCacheShell extends Shell
46
46
public function build ($ name = null )
47
47
{
48
48
$ cache = $ this ->_getOrmCache ();
49
- $ cache ->build ($ name );
49
+ $ tables = $ cache ->build ($ name );
50
+
51
+ foreach ($ tables as $ table ) {
52
+ $ this ->verbose (sprintf ('Cached "%s" ' , $ table ));
53
+ }
50
54
51
55
$ this ->out ('<success>Cache build complete</success> ' );
52
56
@@ -62,7 +66,11 @@ public function build($name = null)
62
66
public function clear ($ name = null )
63
67
{
64
68
$ cache = $ this ->_getOrmCache ();
65
- $ cache ->clear ($ name );
69
+ $ tables = $ cache ->clear ($ name );
70
+
71
+ foreach ($ tables as $ table ) {
72
+ $ this ->verbose (sprintf ('Cleared "%s" ' , $ table ));
73
+ }
66
74
67
75
$ this ->out ('<success>Cache clear complete</success> ' );
68
76
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function setUp()
47
47
$ this ->cache ->expects ($ this ->any ())
48
48
->method ('init ' )
49
49
->will ($ this ->returnValue (true ));
50
- Cache::getConfig ('orm_cache ' , $ this ->cache );
50
+ Cache::setConfig ('orm_cache ' , $ this ->cache );
51
51
52
52
$ ds = ConnectionManager::get ('test ' );
53
53
$ ds ->cacheMetadata ('orm_cache ' );
You can’t perform that action at this time.
0 commit comments