Fr3nch13/CakePHP Utilities

SchemaCache
in package

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.

Tags
link

About the thundering herd problem

Table of Contents

Properties

$_schema  : CachedCollection
Schema

Methods

__construct()  : mixed
Constructor
build()  : array<string|int, string>
Build metadata.
clear()  : array<string|int, string>
Clear metadata.
getSchema()  : CachedCollection
Helper method to get the schema collection.

Properties

Methods

__construct()

Constructor

public __construct(Connection $connection) : mixed
Parameters
$connection : Connection

Connection name to get the schema for or a connection instance

build()

Build metadata.

public build([string|null $name = null ]) : array<string|int, string>
Parameters
$name : string|null = null

The name of the table to build cache data for.

Return values
array<string|int, string>

Returns a list build table caches

clear()

Clear metadata.

public clear([string|null $name = null ]) : array<string|int, string>
Parameters
$name : string|null = null

The name of the table to clear cache data for.

Return values
array<string|int, string>

Returns a list of cleared table caches


        
On this page

Search results