yii2 can`t save data to app cache 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();