Decorates a schema collection and adds caching
Psr\SimpleCache\CacheInterface
Cacher instance.
Cake\Database\Schema\CollectionInterface
The decorated schema collection
string
The cache key prefix
Constructor.
Get the cache key for a given name.
Get the column metadata for a table.
Get a cacher.
Get the list of tables available in the current connection.
Get the list of tables available in the current connection. This will exclude any views in the schema.
Set a cacher.
__construct(Cake\Database\Schema\CollectionInterface $collection, string $prefix, Psr\SimpleCache\CacheInterface $cacher)
Constructor.
Cake\Database\Schema\CollectionInterface
$collection The collection to wrap.
string
$prefix The cache key prefix to use. Typically the connection name.
Psr\SimpleCache\CacheInterface
$cacher Cacher instance.
cacheKey(string $name): string
Get the cache key for a given name.
string
$name The name to get a cache key for.
string
describe(string $name, array<string, mixed> $options = []): Cake\Database\Schema\TableSchemaInterface
Get the column metadata for a table.
Caching will be applied if cacheMetadata
key is present in the Connection configuration options. Defaults to _cakemodel when true.
forceRefresh
- Set to true to force rebuilding the cached metadata. Defaults to false.string
$name array<string, mixed>
$options optional Cake\Database\Schema\TableSchemaInterface
getCacher(): Psr\SimpleCache\CacheInterface
Get a cacher.
Psr\SimpleCache\CacheInterface
listTables(): array<string>
Get the list of tables available in the current connection.
array<string>
listTablesWithoutViews(): array
Get the list of tables available in the current connection. This will exclude any views in the schema.
array
setCacher(Psr\SimpleCache\CacheInterface $cacher): $this
Set a cacher.
Psr\SimpleCache\CacheInterface
$cacher Cacher object
$this
Cacher instance.
Psr\SimpleCache\CacheInterface
The decorated schema collection
Cake\Database\Schema\CollectionInterface
The cache key prefix
string
© 2005–present 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.
https://api.cakephp.org/4.4/class-Cake.Database.Schema.CachedCollection.html