yii2 schema cache clear code example
Example: yii1 refresh cache schema
Yii::app()->db->schema->getTables();
// clear the cache of all loaded tables
Yii::app()->db->schema->refresh();
Yii::app()->db->schema->getTables();
// clear the cache of all loaded tables
Yii::app()->db->schema->refresh();