Increase the performance of yii2 project

Increase the performance of yii2 project


Recently, I was working on yii2 project with php 7.2 ,we were facing an issue on yii2 schema database ,in which we were using it yii2 as layer and was calling another yii2 API .At long run we were able to find that YII2 as some default rules in schema.

Points:
1) By default we are using active record ORM by YII2, So by default yii2 scans the database schema for every SQL query action.
2)To avoid it we used yii2 schema caching along with that ,we create CRON job to executes code from below link.
https://forum.yiiframework.com/t/how-to-clear-schema-cache/35109/6
3) The CRON will refresh the schema of all tables and clear the cache.



Please share your comments ,if there any other way to increase the performance of yii2.

REFERAL:

https://www.yiiframework.com/doc/guide/2.0/en/tutorial-performance-tuning#enable-schema-caching

Comments

Popular posts from this blog

create pdf by using javascript

yii framework simple shopping cart tutorial for beginners

yii2 arrayhelper::map vs array_map