Yii Framework Forum: CDbCache - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CDbCache CDbCache Rate Topic: -----

#1 User is offline   richie 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 18-June 10

  Posted 24 June 2010 - 04:31 AM

'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=test',
'emulatePrepare' => true,
'username' => 'root',
'autoConnect'=>false,
'password' => '123',
'charset' => 'utf8',
),

'cache'=>array(
'class'=>'system.caching.CDbCache',
'connectionID'=>'db',
//'autoCreateCacheTable'=>false,
//'cacheTableName'=>'yiicache',
),

CDbCache had already produced table('yiicache') in my database!

But When my Web application run :

Yii::app()->cache->set("persons",$persons,60);

It will make a mistake:

CDbConnection is inactive and cannot perform any DB operations.

I don't know Why?

Since he had already produced the table, represents CDbCache is normal!

Is really my database question?
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 24 June 2010 - 05:12 AM

No wonder, you disabled auto connect:

View Postrichie, on 24 June 2010 - 04:31 AM, said:

'autoConnect'=>false,

0

#3 User is offline   richie 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 18-June 10

Posted 24 June 2010 - 07:21 PM

Thank you for your reply!

But I had already tried!

It still could not the normal operation!

I thought that is not this reason!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users