Store Cdbcache

Hi

I have a litle problem with CDbCache

I set in config/main.php the CDbCache with

‘cache’ => array(

        'class' => 'CDbCache',

),

Everything is ok but CDbCache creates a file cache-1.1.12.db rather than storing the data into database

according to http://www.yiiframework.com/doc/api/1.1/CDbCache

"CDbCache stores cache data in a DB table named cacheTableName. If the table does not exist, it will be automatically created. By setting autoCreateCacheTable to false, you can also manually create the DB table"

I didn’t set another parameter for cache, I have already set database connection with the ‘db’ => array(…)

I was expected to see the cacheTableName table created into my database but nothing! the CDBCache still creates the file cache-1.1.12.db, What I do wrong?

Thanks

Dear konapaz

We have to set the connectionId property. Otherwise Yii is going to create SQLite3 database in runtime directory.

It should be like




'cache'=>array(

		'class'=>'CDbCache',

		'connectionID'=>'db',

		),



Regards.

Thanks for reply Seenivasan :)

I will try and I will tell you if everything is ok.

It was so simple

it works! thanks :)