On this page
Class CachedCollection
Extends the schema collection class to provide caching
- Cake\Database\Schema\Collection
 Cake\Database\Schema\CachedCollection Cake\Database\Schema\CachedCollection
Method Detail
__constructsource public
__construct( Cake\Datasource\ConnectionInterface $connection , string|boolean $cacheKey true )Constructor.
Parameters
- Cake\Datasource\ConnectionInterface- $connection
- The connection instance.
- 
     string|boolean $cacheKeyoptional true
- The cache key or boolean false to disable caching.
Overrides
Cake\Database\Schema\Collection::__construct()
  cacheKeysource public
cacheKey( string $name )Get the cache key for a given name.
Parameters
- 
     string $name
- The name to get a cache key for.
Returns
stringThe cache key.
cacheMetadatasource public
cacheMetadata( boolean $enable null )Sets the cache config name to use for caching table metadata, or disables it if false is passed. If called with no arguments it returns the current configuration name.
Parameters
- 
     boolean $enableoptional null
- whether or not to enable caching
Returns
string|booleanstring|bool
describesource public
describe( string $name , array $options [] )Get the column metadata for a table.
Parameters
- 
     string $name
- The name of the table to describe.
- 
     array $optionsoptional []
- The options to use, see above.
Returns
Cake\Database\Schema\TableObject with column metadata.
Throws
Cake\Database\Exceptionwhen table cannot be described.
Overrides
Cake\Database\Schema\Collection::describe()
  Methods inherited from Cake\Database\Schema\Collection
_reflectsource protected
_reflect( string $stage , string $name , array $config , Cake\Database\Schema\Table $table )Helper method for running each step of the reflection process.
Parameters
- 
     string $stage
- The stage name.
- 
     string $name
- The table name.
- 
     array $config
- The config data.
- Cake\Database\Schema\Table- $table
- The table instance
Throws
Cake\Database\Exceptionon query failure.
listTablessource public
listTables( )Get the list of tables available in the current connection.
Returns
arrayThe list of tables in the connected database/schema.
Properties summary
$_cachesource
protected string|boolean
The name of the cache config key to use for caching table metadata, of false if disabled.
falseProperties inherited from Cake\Database\Schema\Collection
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
 http://api.cakephp.org/3.1/class-Cake.Database.Schema.CachedCollection.html