Schema Cache Shell
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:
- bin/cake schema_cache build --connection default
This will rebuild the metadata cache for all tables on the default
connection. If you only need to rebuild a single table you can do that byproviding its name:
- bin/cake schema_cache build --connection default articles
In addition to building cached data, you can use the SchemaCacheShell to removecached metadata as well:
- # Clear all metadata
- bin/cake schema_cache clear
- # Clear a single table
- bin/cake schema_cache clear articles
Note
Prior to 3.6 you should use orm_cache
instead of schema_cache
.
当前内容版权归 cakephp.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 cakephp.org .