Schema Cache Tool

The SchemaCacheShell provides a simple CLI tool for managing your application’smetadata caches. In deployment situations it is helpful to rebuild the metadatacache in-place without clearing the existing cache data. You can do this byrunning:

  1. bin/cake schema_cache build --connection default

This will rebuild the metadata cache for all tables on the defaultconnection. If you only need to rebuild a single table you can do that byproviding its name:

  1. bin/cake schema_cache build --connection default articles

In addition to building cached data, you can use the SchemaCacheShell to removecached metadata as well:

  1. # Clear all metadata
  2. bin/cake schema_cache clear
  3.  
  4. # Clear a single table
  5. bin/cake schema_cache clear articles