Answer the question
In order to leave comments, you need to log in
Yii cache + Redis: how to offload MySQL by caching data?
Good day.
There is a huge database with billions of records. There is a fairly loaded project written in Yii.
The architecture is such that all data stored in the database is static, i.e. do not change, but only read. There are a lot of connections in the data through JOINs.
I want to unload MySQL a little due to data caching.
Will a construct like
Model::model()->cache(3600,null,2)->with('one','two','two.one')->findAllByAttributes(array('attr'=>$value));
Answer the question
In order to leave comments, you need to log in
Have you tried caching everything at the DBMS level (I suspect that you are using either mysql or postgres, which do a good job of caching themselves)? it caches requests well if there is a lot of memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question