Class SchemaCache
Schema Cache.
This tool is intended to be used by deployment scripts so that you can prevent thundering herd effects on the metadata cache when new versions of your application are deployed, or when migrations requiring updated metadata are required.
        
    Namespace: Cake\Database
Link: https://en.wikipedia.org/wiki/Thundering_herd_problem About the thundering herd problem
      
  
      Link: https://en.wikipedia.org/wiki/Thundering_herd_problem About the thundering herd problem
Property Summary
- 
        $_schema protectedCake\Database\Schema\CachedCollectionSchema 
Method Summary
- 
          __construct() publicConstructor 
- 
          build() publicBuild metadata. 
- 
          clear() publicClear metadata. 
- 
          getSchema() publicHelper method to get the schema collection. 
Method Detail
__construct() ¶ public
__construct(Cake\Database\Connection $connection)Constructor
Parameters
- 
                Cake\Database\Connection$connection
- Connection name to get the schema for or a connection instance 
build() ¶ public
build(string|null $name = null): array<string>Build metadata.
Parameters
- 
                string|null$name optional
- The name of the table to build cache data for. 
Returns
array<string>Returns a list build table caches
clear() ¶ public
clear(string|null $name = null): array<string>Clear metadata.
Parameters
- 
                string|null$name optional
- The name of the table to clear cache data for. 
Returns
array<string>Returns a list of cleared table caches
getSchema() ¶ public
getSchema(Cake\Database\Connection $connection): Cake\Database\Schema\CachedCollectionHelper method to get the schema collection.
Parameters
- 
                Cake\Database\Connection$connection
- Connection object 
Returns
Cake\Database\Schema\CachedCollectionThrows
RuntimeExceptionIf given connection object is not compatible with schema caching
