I’m at the end of the yii blog tutorial. Final tuning with schema caching. The tutorials code goes for schema caching with sqllite and I wondered what to choose for MySQL databases.
The given example for the configuration file main.php is as followed:
I’ve found an russian topic, title: Integrity Constraint Violation Db Schema Cache, which was getting close in the forum search to my questions but not an answer. Furthermore, I can’t read russian text.
Ah, there’s still MySQL’s internal query cache taking care of that
But seriously: While there are certainly better options, there is technicaly nothing wrong with using CDbCache as a query and schema cache. Wouldn’t use this in production, though
Actually, I suppose one can use memory storage engine, making DB cache lightning fast (?)
But the thing is, those who can do this also can install something like memcached.
BTW: as far as I remember, db cache table doesn’t have any indexes out of the box. Since this can eventually lead to significant performance loss, it must be taken into account.