Can someone help me with CDbCache. Every time I load a page (only once data has been inputted in the cache table) I get the following error: [b]unserialize() [<a href=‘function.unserialize’>function.unserialize</a>]: Error at offset 0 of 1281 bytes
[/b]
The only info I found was here.
Weird thing is that I am not sure why every page is being cached. I verified that my cache table is getting data but I only specify to add to cache in my code below in one action.
This is my main.php settings:
'cache' => array(
'class' => 'CDbCache',
'connectionID'=>'db',
'cacheTableName'=>'yiicache',
),
This is my code for the only action I am calling $cache:
$cache = Yii::app()->cache;
$factsAtAGlance = $cache['brand_reports_pw_facts_at_a_glance'];
if($factsAtAGlance === FALSE || $factsAtAGlance === NULL) {
$factsAtAGlance = $reports->getFactsAtAGlance($brand);
$cache['brand_reports_pw_facts_at_a_glance'] = $factsAtAGlance;
}
Stack Trace
#0
+ /Applications/MAMP/htdocs/leadworks/framework/caching/CCache.php(108): unserialize("x613a323a7b693a303b613a323a7b693a303b613a313a7b693a303b4f3a383a2...")
#1
+ /Applications/MAMP/htdocs/leadworks/framework/web/CUrlManager.php(219): CCache->get("Yii.CUrlManager.rules")
#2
+ /Applications/MAMP/htdocs/leadworks/framework/web/CUrlManager.php(206): CUrlManager->processRules()
#3
+ /Applications/MAMP/htdocs/leadworks/framework/base/CModule.php(387): CUrlManager->init()
#4
+ /Applications/MAMP/htdocs/leadworks/framework/base/CApplication.php(510): CModule->getComponent("urlManager")
#5
+ /Applications/MAMP/htdocs/leadworks/framework/web/CWebApplication.php(140): CApplication->getUrlManager()
#6
+ /Applications/MAMP/htdocs/leadworks/framework/base/CApplication.php(169): CWebApplication->processRequest()
#7
+ /Applications/MAMP/htdocs/leadworks/leadworks/index.php(15): CApplication->run()