Yii Framework Forum: [Solved] Multiple Cache In Query Cache - Yii Framework Forum

Jump to content

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

[Solved] Multiple Cache In Query Cache Rate Topic: -----

#1 User is offline   Greno 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 03-April 13

Posted 07 April 2014 - 04:28 PM

Hi, I want to ask, how can I use another cache system, when I have more then one in query cache.
For example in config I have:
'cache' => array(
	'class' => 'CFileCache'
),
'cache_db' => array(
	'class' => 'CDbCache',
	'cacheTableName' => 'cache',
	'connectionID' => 'db',
	'autoCreateCacheTable' => false
),


And now I want use cache_db in query cache. How can I do it?
Table::model()->cache()->findAll();

0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,598
  • Joined: 04-March 10
  • Location:UK

Posted 08 April 2014 - 05:58 AM

You need to add the following to your database config:

    'components'=>array(
        ...
        'db'=>array(
            ...
            'queryCacheID'=>'cache_db',
        ),
        ...
    ),

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