Hi everyone,
Anyone help me to perform Caching in Yii in easiest and simplest way.
I did code ( following http://www.yiiframew...aching.overview) but it did not work.
Best,
Interboy
Page 1 of 1
[Help] Simple And Fast Way Yii Caching
#3
Posted 11 October 2012 - 07:11 AM
ORey, on 11 October 2012 - 06:51 AM, said:
Not enough info for answering.
I'm newbie to code Caching in general.
I put fragment caching widget begin and end as the Yii guide, but it did not work. I do not know why.
So, as your experience in Yii, please tell by the best solution for caching and how to perform step by step.
Thank you so much,
Interboy
#4
Posted 11 October 2012 - 07:49 AM
Have you set up the cache storage in config file?
Born to create drama
#5
Posted 11 October 2012 - 10:05 AM
ORey, on 11 October 2012 - 07:49 AM, said:
Have you set up the cache storage in config file?
No. Do you mean we need config in main.php first?
In guide, What server1,2, port... I can put? I'm currently using shared hosting.
//main.php in config folder
array(
......
'components'=>array(
......
'cache'=>array(
'class'=>'system.caching.CMemCache',
'servers'=>array(
array('host'=>'server1', 'port'=>11211, 'weight'=>60),
array('host'=>'server2', 'port'=>11211, 'weight'=>40),
),
),
),
);
#6
Posted 11 October 2012 - 10:17 AM
You can start using CFileCache. It is simpler to setup.
If you have APC, you can use CApcCache.
You can also store the cached data in the database with CDbCache, if appropriate.
The configuration example on the guide is for CMemCache. For the other storage, you'll want to read its documentation (on the links above) and configure it accordingly.
If you have APC, you can use CApcCache.
You can also store the cached data in the database with CDbCache, if appropriate.
The configuration example on the guide is for CMemCache. For the other storage, you'll want to read its documentation (on the links above) and configure it accordingly.
Rodrigo Coelho
Check my extension
giix: a code generator for Yii.
The complete beginner's study guide for the Yii Framework
Check my extension
giix: a code generator for Yii.

The complete beginner's study guide for the Yii Framework
#7
Posted 13 October 2012 - 02:48 AM
Can you explain more? Or give me an example, it will help me a lot 
Rodrigo Coelho, on 11 October 2012 - 10:17 AM, said:
You can start using CFileCache. It is simpler to setup.
If you have APC, you can use CApcCache.
You can also store the cached data in the database with CDbCache, if appropriate.
The configuration example on the guide is for CMemCache. For the other storage, you'll want to read its documentation (on the links above) and configure it accordingly.
If you have APC, you can use CApcCache.
You can also store the cached data in the database with CDbCache, if appropriate.
The configuration example on the guide is for CMemCache. For the other storage, you'll want to read its documentation (on the links above) and configure it accordingly.
Share this topic:
Page 1 of 1

Help















